From 7a3fd539c3696d1b35684ab2b771d5ecba4f5b20 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Sat, 6 May 2023 11:30:14 +0200 Subject: [PATCH] [v1.03][X86] Fix compilation warning under Windows --- src/x86/cpuid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x86/cpuid.c b/src/x86/cpuid.c index 060fe4b..c7b567f 100644 --- a/src/x86/cpuid.c +++ b/src/x86/cpuid.c @@ -632,6 +632,7 @@ bool get_cache_topology_amd(struct cpuInfo* cpu, struct topology* topo) { return true; } +#ifdef __linux__ void get_topology_from_udev(struct topology* topo) { // TODO: To be improved in the future topo->total_cores = get_ncores_from_cpuinfo(); @@ -641,6 +642,7 @@ void get_topology_from_udev(struct topology* topo) { topo->smt_supported = 1; topo->sockets = 1; } +#endif // Main reference: https://software.intel.com/content/www/us/en/develop/articles/intel-64-architecture-processor-topology-enumeration.html // Very interesting resource: https://wiki.osdev.org/Detecting_CPU_Topology_(80x86)