2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-08 11:12:23 +00:00

merge from develop with some winapp merge issues.

This commit is contained in:
Vicente J. Botet Escriba
2018-01-28 14:37:53 +01:00
18 changed files with 187 additions and 147 deletions

View File

@@ -27,6 +27,10 @@
#include <unistd.h>
#endif
#if defined(__VXWORKS__)
#include <vxCpuLib.h>
#endif
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/lexical_cast.hpp>
@@ -485,6 +489,18 @@ namespace boost
#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
int const count=sysconf(_SC_NPROCESSORS_ONLN);
return (count>0)?count:0;
#elif defined(__VXWORKS__)
cpuset_t set = ::vxCpuEnabledGet();
#ifdef __DCC__
int i;
for( i = 0; set; ++i)
{
set &= set -1;
}
return(i);
#else
return (__builtin_popcount(set) );
#endif
#elif defined(__GLIBC__)
return get_nprocs();
#else