]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fiber/performance/fiber/bind/bind_processor_freebsd.cpp
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)
7 #include "bind_processor.hpp"
11 #include <sys/param.h>
12 #include <sys/cpuset.h>
17 #include <boost/config/abi_prefix.hpp>
19 void bind_to_processor( unsigned int n
)
23 CPU_SET( n
, & cpuset
);
25 if ( ::cpuset_setaffinity( CPU_LEVEL_WHICH
, CPU_WHICH_TID
, -1, sizeof( cpuset
), & cpuset
) == -1)
26 throw std::runtime_error("::cpuset_setaffinity() failed");
29 #include <boost/config/abi_suffix.hpp>