Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54114 - sandbox/task/boost/task/detail
From: oliver.kowalke_at_[hidden]
Date: 2009-06-19 17:26:33


Author: olli
Date: 2009-06-19 17:26:32 EDT (Fri, 19 Jun 2009)
New Revision: 54114
URL: http://svn.boost.org/trac/boost/changeset/54114

Log:
fixes for processor binding on FreeBSD
Text files modified:
   sandbox/task/boost/task/detail/bind_processor_freebsd.hpp | 20 ++++++++++----------
   1 files changed, 10 insertions(+), 10 deletions(-)

Modified: sandbox/task/boost/task/detail/bind_processor_freebsd.hpp
==============================================================================
--- sandbox/task/boost/task/detail/bind_processor_freebsd.hpp (original)
+++ sandbox/task/boost/task/detail/bind_processor_freebsd.hpp 2009-06-19 17:26:32 EDT (Fri, 19 Jun 2009)
@@ -26,12 +26,12 @@
         {
                 BOOST_ASSERT( n >= 0);
                 BOOST_ASSERT( n < boost::thread::hardware_concurrency() );
-
- cpusetid_t cpusetid;
- CPU_ZERO( & cpusetid);
- CPU_SET( n, & cpusetid);
-
- if ( ::cpuset_setid( CPU_WHICH_TID, -1, cpusetid) == -1)
+
+ cpuset_t cpuset;
+ CPU_ZERO( & cpuset);
+ CPU_SET( n, & cpuset);
+
+ if ( ::cpuset_setaffinity( CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, sizeof( cpuset), & cpuset) == -1)
                         throw boost::system::system_error(
                                         boost::system::error_code(
                                                 errno,
@@ -41,14 +41,14 @@
         inline
         void bind_to_any_processor()
         {
- cpusetid_t cpusetid;
- CPU_ZERO( & cpusetid);
-
+ cpuset_t cpuset;
+ CPU_ZERO( & cpuset);
+
                 unsigned int max( boost::thread::hardware_concurrency() );
                 for ( unsigned int i( 0); i < max; ++i)
                         CPU_SET( i, & cpuset);
                 
- if ( ::cpuset_setid( CPU_WHICH_TID, -1, cpusetid) == -1)
+ if ( ::cpuset_setaffinity( CPU_LEVEL_CPUSET, CPU_WHICH_TID, -1, sizeof( cpuset), & cpuset) == -1)
                         throw boost::system::system_error(
                                         boost::system::error_code(
                                                 errno,


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