Ticket #2053: pthread-prefer-posix.patch
File pthread-prefer-posix.patch, 664 bytes (added by , 14 years ago) |
---|
-
libs/thread/src/pthread/thread.cpp
a b namespace boost 388 388 { 389 389 #if defined(PTW32_VERSION) || defined(__hpux) 390 390 return pthread_num_processors_np(); 391 #elif defined(__linux__)392 return get_nprocs();393 391 #elif defined(__APPLE__) || defined(__FreeBSD__) 394 392 int count; 395 393 size_t size=sizeof(count); … … namespace boost 397 395 #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) 398 396 int const count=sysconf(_SC_NPROCESSORS_ONLN); 399 397 return (count>0)?count:0; 398 #elif defined(__linux__) 399 return get_nprocs(); 400 400 #else 401 401 return 0; 402 402 #endif