在 2025-11-21 17:18, Martin Storsjö 写道:
+#define GetActiveProcessorCount __GetActiveProcessorCount
+#include <windows.h>
+#undef GetActiveProcessorCount
+
+DWORD WINAPI GetActiveProcessorCount(WORD GroupNumber)
+{
+ if (GroupNumber == ALL_PROCESSOR_GROUPS) {
+ SYSTEM_INFO info;
+ GetSystemInfo(&info);
+ return info.dwNumberOfProcessors;
Shouldn't this return
#ifdef _WIN64
return __builtin_popcountll(info.dwActiveProcessorMask);
#else
return __builtin_popcount(info.dwActiveProcessorMask);
#endif
However I do wonder whether such configuration exists in practice, so the proposed change may be
acceptable, too.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
