diff --git a/include/boost/thread/detail/thread.hpp b/include/boost/thread/detail/thread.hpp index 019d0d73..2f6c1581 100644 --- a/include/boost/thread/detail/thread.hpp +++ b/include/boost/thread/detail/thread.hpp @@ -546,7 +546,9 @@ namespace boost void detach(); static unsigned hardware_concurrency() BOOST_NOEXCEPT; +#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY static unsigned physical_concurrency() BOOST_NOEXCEPT; +#endif #define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE typedef detail::thread_data_base::native_handle_type native_handle_type; diff --git a/src/pthread/thread.cpp b/src/pthread/thread.cpp index 39d476a4..e91473c2 100644 --- a/src/pthread/thread.cpp +++ b/src/pthread/thread.cpp @@ -27,6 +27,7 @@ #include #endif +#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY #include #include #include @@ -35,6 +36,7 @@ #include #include #include +#endif #include "./timeconv.inl" @@ -552,6 +554,7 @@ namespace boost #endif } +#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY unsigned thread::physical_concurrency() BOOST_NOEXCEPT { #ifdef __linux__ @@ -601,6 +604,7 @@ namespace boost return hardware_concurrency(); #endif } +#endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void thread::interrupt() diff --git a/src/win32/thread.cpp b/src/win32/thread.cpp index 640664ef..f1774031 100644 --- a/src/win32/thread.cpp +++ b/src/win32/thread.cpp @@ -417,6 +417,7 @@ namespace boost return info.dwNumberOfProcessors; } +#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY unsigned thread::physical_concurrency() BOOST_NOEXCEPT { unsigned cores = 0; @@ -438,6 +439,7 @@ namespace boost } return cores; } +#endif thread::native_handle_type thread::native_handle() { diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9c0f93f7..fc9d9b97 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -209,7 +209,7 @@ rule thread-compile ( sources : reqs * : name ) [ thread-test test_thread.cpp ] [ thread-test test_thread_id.cpp ] [ thread-test test_hardware_concurrency.cpp ] - [ thread-test test_physical_concurrency.cpp ] + #[ thread-test test_physical_concurrency.cpp ] [ thread-test test_thread_move.cpp ] [ thread-test test_thread_return_local.cpp ] [ thread-test test_thread_move_return.cpp ]