thread.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2010 Vicente J. Botet Escriba
  3. * Copyright 2015 Andrey Semashev
  4. *
  5. * Distributed under the Boost Software License, Version 1.0.
  6. * See http://www.boost.org/LICENSE_1_0.txt
  7. */
  8. #ifndef BOOST_WINAPI_THREAD_HPP_INCLUDED_
  9. #define BOOST_WINAPI_THREAD_HPP_INCLUDED_
  10. #include <boost/winapi/basic_types.hpp>
  11. #include <boost/winapi/get_current_thread.hpp>
  12. #include <boost/winapi/get_current_thread_id.hpp>
  13. #ifdef BOOST_HAS_PRAGMA_ONCE
  14. #pragma once
  15. #endif
  16. #if BOOST_WINAPI_PARTITION_APP_SYSTEM
  17. #include <boost/winapi/detail/header.hpp>
  18. #if !defined( BOOST_USE_WINDOWS_H )
  19. extern "C" {
  20. BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
  21. SleepEx(
  22. boost::winapi::DWORD_ dwMilliseconds,
  23. boost::winapi::BOOL_ bAlertable);
  24. BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC Sleep(boost::winapi::DWORD_ dwMilliseconds);
  25. BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC SwitchToThread(BOOST_WINAPI_DETAIL_VOID);
  26. } // extern "C"
  27. #endif
  28. namespace boost {
  29. namespace winapi {
  30. using ::SleepEx;
  31. using ::Sleep;
  32. using ::SwitchToThread;
  33. }
  34. }
  35. #include <boost/winapi/detail/footer.hpp>
  36. #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
  37. #endif // BOOST_WINAPI_THREAD_HPP_INCLUDED_