diff --git a/include/boost/thread/detail/config.hpp b/include/boost/thread/detail/config.hpp index 62461c51..5ffe5e49 100644 --- a/include/boost/thread/detail/config.hpp +++ b/include/boost/thread/detail/config.hpp @@ -379,7 +379,9 @@ // compatibility with the rest of Boost's auto-linking code: #if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) # undef BOOST_THREAD_USE_LIB -# define BOOST_THREAD_USE_DLL +# if !defined(BOOST_THREAD_USE_DLL) +# define BOOST_THREAD_USE_DLL +# endif #endif #if defined(BOOST_THREAD_BUILD_DLL) //Build dll diff --git a/include/boost/thread/sync_queue.hpp b/include/boost/thread/sync_queue.hpp index 45538ef0..b781ec23 100644 --- a/include/boost/thread/sync_queue.hpp +++ b/include/boost/thread/sync_queue.hpp @@ -34,6 +34,7 @@ namespace boost typedef ValueType value_type; typedef csbl::deque underlying_queue_type; typedef std::size_t size_type; + typedef queue_op_status op_status; // Constructors/Assignment/Destructors BOOST_THREAD_NO_COPYABLE(sync_queue) diff --git a/src/pthread/thread.cpp b/src/pthread/thread.cpp index b09f015f..4eab832b 100644 --- a/src/pthread/thread.cpp +++ b/src/pthread/thread.cpp @@ -444,7 +444,7 @@ namespace boost { # if defined(BOOST_HAS_PTHREAD_DELAY_NP) - # if defined(__IBMCPP__) + # if defined(__IBMCPP__) || defined(_AIX) BOOST_VERIFY(!pthread_delay_np(const_cast(&ts))); # else BOOST_VERIFY(!pthread_delay_np(&ts)); @@ -594,7 +594,7 @@ namespace boost boost::split(key_val, line, boost::is_any_of(":")); if (key_val.size() != 2) - return 0; + return hardware_concurrency(); string key = key_val[0]; string value = key_val[1]; @@ -612,9 +612,11 @@ namespace boost continue; } } - return cores.size(); + // Fall back to hardware_concurrency() in case + // /proc/cpuinfo is formatted differently than we expect. + return cores.size() != 0 ? cores.size() : hardware_concurrency(); } catch(...) { - return 0; + return hardware_concurrency(); } #elif defined(__APPLE__) int count;