Skip to content
Snippets Groups Projects
Commit d4310fdd authored by Utz-Uwe Haus's avatar Utz-Uwe Haus Committed by Ali Mohammed
Browse files

Disable apple-specific CPUID code

That code only works on x86 based macos systems; we'll need to implement
a separate solution based on 
syctlbyname https://developer.apple.com/documentation/kernel/1387446-sysctlbyname
parent d81921c5
Branches
No related tags found
1 merge request!54Resolve "Compilation error when building maestro-core on M1 Apple processors"
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <numaif.h> #include <numaif.h>
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__ && (!defined(__arm64__))
#include <cpuid.h> #include <cpuid.h>
#endif #endif
...@@ -106,7 +106,7 @@ int ...@@ -106,7 +106,7 @@ int
mstro_numa_get_cpu(void) { mstro_numa_get_cpu(void) {
#if defined(__linux) || defined(__linux__) #if defined(__linux) || defined(__linux__)
return sched_getcpu(); return sched_getcpu();
#elif __APPLE__ #elif __APPLE__ && (!defined(__arm64__))
#define CPUID(INFO, LEAF, SUBLEAF) __cpuid_count(LEAF, SUBLEAF, INFO[0], INFO[1], INFO[2], INFO[3]) #define CPUID(INFO, LEAF, SUBLEAF) __cpuid_count(LEAF, SUBLEAF, INFO[0], INFO[1], INFO[2], INFO[3])
uint32_t CPUInfo[4]; uint32_t CPUInfo[4];
CPUID(CPUInfo, 1, 0); CPUID(CPUInfo, 1, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment