|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2008-07-21 06:25:09
Author: anthonyw
Date: 2008-07-21 06:25:08 EDT (Mon, 21 Jul 2008)
New Revision: 47653
URL: http://svn.boost.org/trac/boost/changeset/47653
Log:
Use sysconf to detect number of processors on AIX too
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 2008-07-21 06:25:08 EDT (Mon, 21 Jul 2008)
@@ -18,7 +18,7 @@
#elif defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
-#elif defined(__sun) || defined(__CYGWIN__)
+#elif defined(__sun) || defined(__CYGWIN__) || defined(_AIX)
#include <unistd.h>
#endif
@@ -394,7 +394,7 @@
int count;
size_t size=sizeof(count);
return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
-#elif defined(__sun) || defined(__CYGWIN__)
+#elif defined(__sun) || defined(__CYGWIN__) || defined(_AIX)
int const count=sysconf(_SC_NPROCESSORS_ONLN);
return (count>0)?count:0;
#else
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