ntdll: Set cpu frequency for FreeBSD 7.2 and higher.
This commit is contained in:
parent
06c45a8d59
commit
69d7233e3e
|
@ -1136,6 +1136,10 @@ void fill_cpu_info(void)
|
||||||
ret = sysctlbyname("hw.ncpu", &num, &len, NULL, 0);
|
ret = sysctlbyname("hw.ncpu", &num, &len, NULL, 0);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
NtCurrentTeb()->Peb->NumberOfProcessors = num;
|
NtCurrentTeb()->Peb->NumberOfProcessors = num;
|
||||||
|
|
||||||
|
len = sizeof(num);
|
||||||
|
if (!sysctlbyname("dev.cpu.0.freq", &num, &len, NULL, 0))
|
||||||
|
cpuHz = num * 1000 * 1000;
|
||||||
}
|
}
|
||||||
#elif defined(__sun)
|
#elif defined(__sun)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue