|
|
|
@ -65,20 +65,4 @@ get_thread_libuv_handle(void)
|
|
|
|
|
return &uvio_handle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get CPU time in cycles using the Intel instruction rdtsc
|
|
|
|
|
* @return CPU time in cycles
|
|
|
|
|
**/
|
|
|
|
|
static unsigned long long int
|
|
|
|
|
rdtsc(void)
|
|
|
|
|
{
|
|
|
|
|
unsigned long long int cpu_time_in_cycles = 0;
|
|
|
|
|
unsigned int cycles_lo;
|
|
|
|
|
unsigned int cycles_hi;
|
|
|
|
|
__asm__ volatile("RDTSC" : "=a"(cycles_lo), "=d"(cycles_hi));
|
|
|
|
|
cpu_time_in_cycles = (unsigned long long int)cycles_hi << 32 | cycles_lo;
|
|
|
|
|
|
|
|
|
|
return cpu_time_in_cycles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* SFRT_RUNTIME_H */
|
|
|
|
|