diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp index 028d36e3bfb37..e494574ec21dd 100644 --- a/libcxx/src/thread.cpp +++ b/libcxx/src/thread.cpp @@ -74,9 +74,7 @@ unsigned thread::hardware_concurrency() noexcept { return 0; return static_cast(result); #elif defined(_LIBCPP_WIN32API) - SYSTEM_INFO info; - GetSystemInfo(&info); - return info.dwNumberOfProcessors; + return static_cast(GetActiveProcessorCount(ALL_PROCESSOR_GROUPS)); #else // defined(CTL_HW) && defined(HW_NCPU) // TODO: grovel through /proc or check cpuid on x86 and similar // instructions on other architectures.