Re: [PATCH 6/8] ntdll: Standardize on sysconf to detect the number of processors for all platforms.
James Eder <jimportal(a)gmail.com> writes:
@@ -1010,6 +1010,16 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) */ void fill_cpu_info(void) { + long num; + + num = sysconf(_SC_NPROCESSORS_ONLN); + if (num < 1) + { + num = 1; + WARN("Failed to detect the number of processors.\n"); + } + NtCurrentTeb()->Peb->NumberOfProcessors = num;
Have you verified that this works correctly on all the platforms you are changing? -- Alexandre Julliard julliard(a)winehq.org
Have you verified that this works correctly on all the platforms you are changing?
-- Alexandre Julliard julliard(a)winehq.org
Having another look, some of the BSDs are lacking or gained support only somewhat recently. I had thought the BSDs weren't so different. For Apple we need 10.4 or later it seems. I'll send a (hopefully) better patch shortly. The new patch selects the appropriate API by availability rather than by OS. -- Jim
participants (2)
-
Alexandre Julliard -
James Eder