Ticket #2053: pthread-prefer-posix.patch

File pthread-prefer-posix.patch, 664 bytes (added by Mike Frysinger <vapier@…>, 14 years ago)
  • libs/thread/src/pthread/thread.cpp

    a b namespace boost  
    388388    {
    389389#if defined(PTW32_VERSION) || defined(__hpux)
    390390        return pthread_num_processors_np();
    391 #elif defined(__linux__)
    392         return get_nprocs();
    393391#elif defined(__APPLE__) || defined(__FreeBSD__)
    394392        int count;
    395393        size_t size=sizeof(count);
    namespace boost  
    397395#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
    398396        int const count=sysconf(_SC_NPROCESSORS_ONLN);
    399397        return (count>0)?count:0;
     398#elif defined(__linux__)
     399        return get_nprocs();
    400400#else
    401401        return 0;
    402402#endif