]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/fiber/performance/fiber/bind/bind_processor_windows.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fiber / performance / fiber / bind / bind_processor_windows.cpp
CommitLineData
7c673cae
FG
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
9extern "C"
10{
11#include <windows.h>
12}
13
14#include <stdexcept>
15
16#include <boost/config/abi_prefix.hpp>
17
18void bind_to_processor( unsigned int n)
19{
20 if ( ::SetThreadAffinityMask( ::GetCurrentThread(), ( DWORD_PTR)1 << n) == 0)
21 throw std::runtime_error("::SetThreadAffinityMask() failed");
22}
23
24#include <boost/config/abi_suffix.hpp>