]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/coroutine2/performance/bind_processor_solaris.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / coroutine2 / performance / bind_processor_solaris.cpp
1
2 // Copyright Oliver Kowalke 2014.
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/types.h>
12 #include <sys/processor.h>
13 #include <sys/procset.h>
14 }
15
16 #include <stdexcept>
17
18 #include <boost/config/abi_prefix.hpp>
19
20 void bind_to_processor( unsigned int n)
21 {
22 if ( ::processor_bind( P_LWPID, P_MYID, static_cast< processorid_t >( n), 0) == -1)
23 throw std::runtime_error("::processor_bind() failed");
24 }
25
26 #include <boost/config/abi_suffix.hpp>