|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54062 - sandbox/task/boost/task/detail
From: oliver.kowalke_at_[hidden]
Date: 2009-06-18 15:10:50
Author: olli
Date: 2009-06-18 15:10:50 EDT (Thu, 18 Jun 2009)
New Revision: 54062
URL: http://svn.boost.org/trac/boost/changeset/54062
Log:
* header for processor binding on FreeBSD
Added:
sandbox/task/boost/task/detail/bind_processor_freebsd.hpp (contents, props changed)
Added: sandbox/task/boost/task/detail/bind_processor_freebsd.hpp
==============================================================================
--- (empty file)
+++ sandbox/task/boost/task/detail/bind_processor_freebsd.hpp 2009-06-18 15:10:50 EDT (Thu, 18 Jun 2009)
@@ -0,0 +1,49 @@
+
+// Copyright Oliver Kowalke 2009.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TASK_DETAIL_BIND_PROCESSOR_FREEBSD_H
+#define BOOST_TASK_DETAIL_BIND_PROCESSOR_FREEBSD_H
+
+extern "C"
+{
+
+}
+
+#include <boost/assert.hpp>
+#include <boost/thread.hpp>
+#include <boost/system/system_error.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost { namespace this_thread
+{
+ inline
+ void bind_to_processor( unsigned int n)
+ {
+ BOOST_ASSERT( n >= 0);
+ BOOST_ASSERT( n < boost::thread::hardware_concurrency() );
+
+// if ( ::processor_bind( P_LWPID, P_MYID, static_cast< processorid_t >( n), 0) == -1)
+// throw boost::system::system_error(
+// boost::system::error_code(
+// errno,
+// boost::system::system_category) );
+ }
+
+ inline
+ void bind_to_any_processor()
+ {
+// if ( ::processor_bind( P_LWPID, P_MYID, PBIND_NONE, 0) == -1)
+// throw boost::system::system_error(
+// boost::system::error_code(
+// errno,
+// boost::system::system_category) );
+ }
+}}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif // BOOST_TASK_DETAIL_BIND_PROCESSOR_FREEBSD_H
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