]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fiber/performance/fiber/bind/bind_processor_aix.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fiber / performance / fiber / bind / bind_processor_aix.cpp
1
2 // Copyright Oliver Kowalke 2009.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6
7 #include "bind_processor.hpp"
8
9 extern "C"
10 {
11 #include <sys/processor.h>
12 #include <sys/thread.h>
13 }
14
15 #include <stdexcept>
16
17 #include <boost/config/abi_prefix.hpp>
18
19 void bind_to_processor( unsigned int n)
20 {
21 if ( ::bindprocessor( BINDTHREAD, ::thread_self(), static_cast< cpu_t >( n) ) == -1)
22 throw std::runtime_error("::bindprocessor() failed");
23 }
24
25 #include <boost/config/abi_suffix.hpp>