Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85926 - in trunk: boost/thread/detail libs/thread/src/pthread libs/thread/src/win32 libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2013-09-26 02:54:33


Author: viboes
Date: 2013-09-26 02:54:33 EDT (Thu, 26 Sep 2013)
New Revision: 85926
URL: http://svn.boost.org/trac/boost/changeset/85926

Log:
Thread: provide physical concurrency conditional until it no regression is introduced.

Text files modified:
   trunk/boost/thread/detail/thread.hpp | 2 ++
   trunk/libs/thread/src/pthread/thread.cpp | 4 ++++
   trunk/libs/thread/src/win32/thread.cpp | 2 ++
   trunk/libs/thread/test/Jamfile.v2 | 2 +-
   4 files changed, 9 insertions(+), 1 deletions(-)

Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp Thu Sep 26 02:52:33 2013 (r85925)
+++ trunk/boost/thread/detail/thread.hpp 2013-09-26 02:54:33 EDT (Thu, 26 Sep 2013) (r85926)
@@ -546,7 +546,9 @@
         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;

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp Thu Sep 26 02:52:33 2013 (r85925)
+++ trunk/libs/thread/src/pthread/thread.cpp 2013-09-26 02:54:33 EDT (Thu, 26 Sep 2013) (r85926)
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #endif
 
+#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/lexical_cast.hpp>
@@ -35,6 +36,7 @@
 #include <string>
 #include <set>
 #include <vector>
+#endif
 
 #include "./timeconv.inl"
 
@@ -552,6 +554,7 @@
 #endif
     }
 
+#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY
     unsigned thread::physical_concurrency() BOOST_NOEXCEPT
     {
 #ifdef __linux__
@@ -601,6 +604,7 @@
         return hardware_concurrency();
 #endif
     }
+#endif
 
 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     void thread::interrupt()

Modified: trunk/libs/thread/src/win32/thread.cpp
==============================================================================
--- trunk/libs/thread/src/win32/thread.cpp Thu Sep 26 02:52:33 2013 (r85925)
+++ trunk/libs/thread/src/win32/thread.cpp 2013-09-26 02:54:33 EDT (Thu, 26 Sep 2013) (r85926)
@@ -417,6 +417,7 @@
         return info.dwNumberOfProcessors;
     }
 
+#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY
     unsigned thread::physical_concurrency() BOOST_NOEXCEPT
     {
         unsigned cores = 0;
@@ -438,6 +439,7 @@
         }
         return cores;
     }
+#endif
 
     thread::native_handle_type thread::native_handle()
     {

Modified: trunk/libs/thread/test/Jamfile.v2
==============================================================================
--- trunk/libs/thread/test/Jamfile.v2 Thu Sep 26 02:52:33 2013 (r85925)
+++ trunk/libs/thread/test/Jamfile.v2 2013-09-26 02:54:33 EDT (Thu, 26 Sep 2013) (r85926)
@@ -209,7 +209,7 @@
           [ 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 ]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk