From 14c5cff2eeb1454130b4313c8f22f1853c1f6acd Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sat, 29 Nov 2014 11:43:36 +0100 Subject: [PATCH] thread: physical_concurrency - windows xp does not provide GetLogicalProcessorInformation --- src/win32/thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win32/thread.cpp b/src/win32/thread.cpp index ed2c10bf..5c789b65 100644 --- a/src/win32/thread.cpp +++ b/src/win32/thread.cpp @@ -529,11 +529,12 @@ namespace boost unsigned thread::physical_concurrency() BOOST_NOEXCEPT { -#if BOOST_PLAT_WINDOWS_RUNTIME +#if BOOST_PLAT_WINDOWS_RUNTIME \ + || ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \ // a bit too strict: Windows XP with SP3 would be sufficient + || ( defined(__MINGW32__) && !defined(__MINGW64__) ) return hardware_concurrency(); #else unsigned cores = 0; -#if !(defined(__MINGW32__) || defined (__MINGW64__)) DWORD size = 0; GetLogicalProcessorInformation(NULL, &size); @@ -550,7 +551,6 @@ namespace boost if (buffer[i].Relationship == RelationProcessorCore) ++cores; } -#endif return cores; #endif }