]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fiber/performance/fiber/bind/bind_processor_hpux.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fiber / performance / fiber / bind / bind_processor_hpux.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/pthread.h>
12 }
13
14 #include <stdexcept>
15
16 #include <boost/config/abi_prefix.hpp>
17
18 void bind_to_processor( unsigned int n)
19 {
20 ::pthread_spu_t spu;
21 int errno_(
22 ::pthread_processor_bind_np(
23 PTHREAD_BIND_FORCED_NP,
24 & spu,
25 static_cast< pthread_spu_t >( n),
26 PTHREAD_SELFTID_NP) );
27 if ( errno_ != 0)
28 throw std::runtime_error("::pthread_processor_bind_np() failed");
29 }
30
31 #include <boost/config/abi_suffix.hpp>