pin_thread.hpp 773 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright Oliver Kowalke 2017.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_FIBERS_NUMA_PIN_THREAD_H
  6. #define BOOST_FIBERS_NUMA_PIN_THREAD_H
  7. #include <cstdint>
  8. #include <thread>
  9. #include <boost/config.hpp>
  10. #include <boost/fiber/detail/config.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace fibers {
  16. namespace numa {
  17. BOOST_FIBERS_DECL
  18. void pin_thread( std::uint32_t, std::thread::native_handle_type);
  19. BOOST_FIBERS_DECL
  20. void pin_thread( std::uint32_t cpuid);
  21. }}}
  22. #ifdef BOOST_HAS_ABI_HEADERS
  23. # include BOOST_ABI_SUFFIX
  24. #endif
  25. #endif // BOOST_FIBERS_NUMA_PIN_THREAD_H