mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
remove support for Darwin/macOS
This commit is contained in:
parent
ab1d3a95eb
commit
cfc3320666
3 changed files with 1 additions and 18 deletions
|
@ -31,11 +31,6 @@
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <x86intrin.h>
|
#include <x86intrin.h>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <villas/kernel/kernel.hpp>
|
#include <villas/kernel/kernel.hpp>
|
||||||
|
|
||||||
#ifndef bit_TSC
|
#ifndef bit_TSC
|
||||||
|
|
|
@ -81,7 +81,7 @@ int villas::kernel::getCachelineSize()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__)
|
||||||
int villas::kernel::getPageSize()
|
int villas::kernel::getPageSize()
|
||||||
{
|
{
|
||||||
return sysconf(_SC_PAGESIZE);
|
return sysconf(_SC_PAGESIZE);
|
||||||
|
|
|
@ -55,18 +55,6 @@ int tsc_init(struct Tsc *t)
|
||||||
ret = kernel::get_cpu_frequency(&t->frequency);
|
ret = kernel::get_cpu_frequency(&t->frequency);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
#elif defined(__APPLE__)
|
|
||||||
int64_t frequency;
|
|
||||||
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", &frequency, &lenp, nullptr, 0);
|
|
||||||
ret = sysctlbyname("machdep.tsc.frequency", &frequency, &lenp, nullptr, 0);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
t->frequency = frequency;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue