Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75800 - trunk/libs/thread/src/pthread
From: vicente.botet_at_[hidden]
Date: 2011-12-04 09:33:09


Author: viboes
Date: 2011-12-04 09:33:08 EST (Sun, 04 Dec 2011)
New Revision: 75800
URL: http://svn.boost.org/trac/boost/changeset/75800

Log:
Thread: #6100 Compute hardware_concurrency() using get_nprocs() on GLIBC systems
Text files modified:
   trunk/libs/thread/src/pthread/thread.cpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2011-12-04 09:33:08 EST (Sun, 04 Dec 2011)
@@ -14,7 +14,7 @@
 #include <boost/thread/once.hpp>
 #include <boost/thread/tss.hpp>
 #include <boost/throw_exception.hpp>
-#ifdef __linux__
+#ifdef __GLIBC__
 #include <sys/sysinfo.h>
 #elif defined(__APPLE__) || defined(__FreeBSD__)
 #include <sys/types.h>
@@ -386,7 +386,7 @@
 #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
         int const count=sysconf(_SC_NPROCESSORS_ONLN);
         return (count>0)?count:0;
-#elif defined(_GNU_SOURCE)
+#elif defined(__GLIBC__)
         return get_nprocs();
 #else
         return 0;


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