• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Andrey Semashev
3  *
4  * Distributed under the Boost Software License, Version 1.0.
5  * See http://www.boost.org/LICENSE_1_0.txt
6  */
7 
8 #ifndef BOOST_WINAPI_WAIT_ON_ADDRESS_HPP_INCLUDED_
9 #define BOOST_WINAPI_WAIT_ON_ADDRESS_HPP_INCLUDED_
10 
11 #include <boost/winapi/config.hpp>
12 
13 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8 && (BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM)
14 
15 #include <boost/winapi/basic_types.hpp>
16 #include <boost/winapi/detail/header.hpp>
17 
18 #ifdef BOOST_HAS_PRAGMA_ONCE
19 #pragma once
20 #endif
21 
22 #if !defined(BOOST_USE_WINDOWS_H)
23 extern "C" {
24 
25 // Note: These functions are not dllimport
26 boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
27 WaitOnAddress(
28     volatile boost::winapi::VOID_* addr,
29     boost::winapi::PVOID_ compare_addr,
30     boost::winapi::SIZE_T_ size,
31     boost::winapi::DWORD_ timeout_ms);
32 
33 boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
34 WakeByAddressSingle(boost::winapi::PVOID_ addr);
35 
36 boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
37 WakeByAddressAll(boost::winapi::PVOID_ addr);
38 
39 } // extern "C"
40 #endif // !defined(BOOST_USE_WINDOWS_H)
41 
42 namespace boost {
43 namespace winapi {
44 
45 using ::WaitOnAddress;
46 using ::WakeByAddressSingle;
47 using ::WakeByAddressAll;
48 
49 }
50 }
51 
52 #include <boost/winapi/detail/footer.hpp>
53 
54 #endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8 && (BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM)
55 
56 #endif // BOOST_WINAPI_WAIT_ON_ADDRESS_HPP_INCLUDED_
57