[Bug 30038] New: Detect CPU speed by using sysctl "hw.clockrate" instead of "dev.cpu.0.freq"

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Feb 28 15:30:31 CST 2012


http://bugs.winehq.org/show_bug.cgi?id=30038

             Bug #: 30038
           Summary: Detect CPU speed by using sysctl "hw.clockrate"
                    instead of "dev.cpu.0.freq"
           Product: Wine
           Version: 1.4-rc5
          Platform: x86
        OS/Version: FreeBSD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ntdll
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: hardy.schumacher at gmx.de
    Classification: Unclassified


In dlls/ntdll/nt.c cpu speed on FreeBSD is actually taken from sysctl
"dev.cpu.0.freq". If the related value could not be found default value of 1GHz
is used.
Actually FreeBSD does not provide a sysctl variable "dev.cpu.0.freq".
The actual speed of the cpu is stored in sysctl variable "hw.clockrate".

Potential fix:
Change in dlls/ntdll/nt.c (line 1181)
--if (!sysctlbyname("dev.cpu.0.freq", &num, &len, NULL, 0))
+++if (!sysctlbyname("hw.clockrate", &num, &len, NULL, 0))

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list