mirror of
https://github.com/boostorg/thread.git
synced 2026-01-26 07:02:12 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace boost
|
||||
typedef ValueType value_type;
|
||||
typedef csbl::deque<ValueType> underlying_queue_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef queue_op_status op_status;
|
||||
|
||||
// Constructors/Assignment/Destructors
|
||||
BOOST_THREAD_NO_COPYABLE(sync_queue)
|
||||
|
||||
@@ -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<timespec*>(&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;
|
||||
|
||||
Reference in New Issue
Block a user