ntdll: use proper CPU speed detection

Austin English austinenglish at gmail.com
Wed Feb 29 18:09:59 CST 2012


Based on a patch by Hardy Schumacher.

Verified on FreeBSD 9.

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 30d3e34..3ed8038 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1178,7 +1178,7 @@ void fill_cpu_info(void)
             NtCurrentTeb()->Peb->NumberOfProcessors = num;
 
         len = sizeof(num);
-        if (!sysctlbyname("dev.cpu.0.freq", &num, &len, NULL, 0))
+        if (!sysctlbyname("hw.clockrate", &num, &len, NULL, 0))
             cpuHz = num * 1000 * 1000;
     }
 #elif defined(__sun)


More information about the wine-patches mailing list