]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // thread.hpp --------------------------------------------------------------// |
2 | ||
3 | // Copyright 2010 Vicente J. Botet Escriba | |
4 | // Copyright 2015 Andrey Semashev | |
5 | ||
6 | // Distributed under the Boost Software License, Version 1.0. | |
7 | // See http://www.boost.org/LICENSE_1_0.txt | |
8 | ||
9 | ||
10 | #ifndef BOOST_DETAIL_WINAPI_THREAD_HPP | |
11 | #define BOOST_DETAIL_WINAPI_THREAD_HPP | |
12 | ||
13 | #include <boost/detail/winapi/basic_types.hpp> | |
14 | #include <boost/detail/winapi/get_current_thread.hpp> | |
15 | #include <boost/detail/winapi/get_current_thread_id.hpp> | |
16 | ||
17 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
18 | #pragma once | |
19 | #endif | |
20 | ||
21 | #if !defined( BOOST_USE_WINDOWS_H ) | |
22 | extern "C" { | |
23 | BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI | |
24 | SleepEx( | |
25 | boost::detail::winapi::DWORD_ dwMilliseconds, | |
26 | boost::detail::winapi::BOOL_ bAlertable); | |
27 | BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI Sleep(boost::detail::winapi::DWORD_ dwMilliseconds); | |
28 | BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SwitchToThread(BOOST_DETAIL_WINAPI_VOID); | |
29 | } | |
30 | #endif | |
31 | ||
32 | namespace boost { | |
33 | namespace detail { | |
34 | namespace winapi { | |
35 | using ::SleepEx; | |
36 | using ::Sleep; | |
37 | using ::SwitchToThread; | |
38 | } | |
39 | } | |
40 | } | |
41 | ||
42 | #endif // BOOST_DETAIL_WINAPI_THREAD_HPP |