about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/my_cpuid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c
index dc19dd5c..b7163861 100644
--- a/src/tools/my_cpuid.c
+++ b/src/tools/my_cpuid.c
@@ -45,8 +45,8 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u)
             R_EAX = 0x00000601; // family and all
             R_EBX = 0 | (8<<0x8) | (ncpu<<16);          // Brand index, CLFlush (8), Max APIC ID (16-23), Local APIC ID (24-31)
             {
-                unsigned int cpu =0, node=0;
-                getcpu(&cpu, &node);
+                int cpu = sched_getcpu();
+                if(cpu<0) cpu=0;
                 R_EAX |= cpu<<24;
             }
             R_EDX =   1         // fpu