Freddie Tilley : ntdll: Set cpu frequency for FreeBSD 7.2 and higher.

Alexandre Julliard julliard at winehq.org
Wed Jan 20 14:29:44 CST 2010


Module: wine
Branch: master
Commit: 69d7233e3e6de5e792f744f6c9666612b5fe129c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=69d7233e3e6de5e792f744f6c9666612b5fe129c

Author: Freddie Tilley <freddie.tilley at gmail.com>
Date:   Wed Jan 20 11:59:25 2010 +0100

ntdll: Set cpu frequency for FreeBSD 7.2 and higher.

---

 dlls/ntdll/nt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index bc01a4f..5cc4877 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1136,6 +1136,10 @@ void fill_cpu_info(void)
         ret = sysctlbyname("hw.ncpu", &num, &len, NULL, 0);
         if (!ret)
             NtCurrentTeb()->Peb->NumberOfProcessors = num;
+
+        len = sizeof(num);
+        if (!sysctlbyname("dev.cpu.0.freq", &num, &len, NULL, 0))
+            cpuHz = num * 1000 * 1000;
     }
 #elif defined(__sun)
     {




More information about the wine-cvs mailing list