mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
tsc: inline calls to tsc_now()
This commit is contained in:
parent
4715706f85
commit
ca51f1795f
2 changed files with 8 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue