1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixup tsc

This commit is contained in:
Steffen Vogel 2018-08-13 15:28:49 +02:00
parent 743d1dd22b
commit d7e4ea9dea
2 changed files with 3 additions and 2 deletions

View file

@ -72,6 +72,7 @@ set(LIB_SRC
table.c
bitset.c
signal.c
tsc.c
)
if(IBVERBS_FOUND AND RDMACM_FOUND)

View file

@ -55,11 +55,11 @@ int tsc_init(struct tsc *t)
return ret;
#elif defined(__APPLE__)
int64_t frequency;
size_t lenp = sizeof(tscfreq);
size_t lenp = sizeof(frequency);
/** @todo: machdep.tsc.frequency seems to be a measured frequency (based on local APIC?
* We should figure out which frequency is more accurate */
// ret = sysctlbyname("hw.cpufrequency", &tscfreq, &lenp, NULL, 0);
// ret = sysctlbyname("hw.cpufrequency", &frequency, &lenp, NULL, 0);
ret = sysctlbyname("machdep.tsc.frequency", &frequency, &lenp, NULL, 0);
if (ret)
return ret;