Commit 36903b4f authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

tsc: inline calls to tsc_now()

parent 9f8c623b
......@@ -92,12 +92,18 @@ static inline uint64_t rdtsc()
return tsc;
}
__attribute__((unused))
static uint64_t tsc_now(struct tsc *t)
{
return t->rdtscp_supported
? rdtscp()
: rdtsc();
}
int tsc_init(struct tsc *t);
uint64_t tsc_rate_to_cycles(struct tsc *t, double rate);
uint64_t tsc_now(struct tsc *t);
#ifdef __cplusplus
}
#endif
......@@ -75,10 +75,3 @@ uint64_t tsc_rate_to_cycles(struct tsc *t, double rate)
{
return t->frequency / rate;
}
uint64_t tsc_now(struct tsc *t)
{
return t->rdtscp_supported
? rdtscp()
: rdtsc();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment