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

remove support for Darwin/macOS

This commit is contained in:
Steffen Vogel 2022-03-14 19:55:05 -04:00
parent d22855d16c
commit e53f65ccc5
3 changed files with 1 additions and 18 deletions

View file

@ -31,11 +31,6 @@
#include <cinttypes>
#include <x86intrin.h>
#ifdef __APPLE__
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
#include <villas/kernel/kernel.hpp>
#ifndef bit_TSC

View file

@ -81,7 +81,7 @@ int villas::kernel::getCachelineSize()
#endif
}
#if defined(__linux__) || defined(__APPLE__)
#if defined(__linux__)
int villas::kernel::getPageSize()
{
return sysconf(_SC_PAGESIZE);

View file

@ -55,18 +55,6 @@ int tsc_init(struct Tsc *t)
ret = kernel::get_cpu_frequency(&t->frequency);
if (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
}