fairness  v1.0.0
A collection of advanced syncronization mechanisms.
Loading...
Searching...
No Matches
wait_ops_windows.hpp
Go to the documentation of this file.
1
14#ifndef BOOST_FAIRNESS_WAIT_OPS_WINDOWS_HPP
15#define BOOST_FAIRNESS_WAIT_OPS_WINDOWS_HPP
17
18#define WIN32_LEAN_AND_MEAN
19#include <Windows.h>
20#undef WIN32_LEAN_AND_MEAN
21
23
24 template<typename T, typename K>
25 inline void wait_(T& mem, K expected){
26 static_assert(
27 sizeof(T) == 1 ||
28 sizeof(T) == 2 ||
29 sizeof(T) == 4 ||
30 sizeof(T) == 8 ||
31 , "Invalid argument size on boost::fairness::detail::wait"
32 );
33 WaitOnAddress(&mem, &expected, sizeof(expected), INFINITE);
34 }
35
36 template<typename T>
37 inline void notify_one_(T& mem){
38 static_assert(
39 sizeof(T) == 1 ||
40 sizeof(T) == 2 ||
41 sizeof(T) == 4 ||
42 sizeof(T) == 8 ||
43 , "Invalid argument size on boost::fairness::detail::notify_one"
44 );
45 WakeByAddressSingle(&mem);
46 }
47
48 template<typename T>
49 inline void notify_all_(T& mem){
50 static_assert(
51 sizeof(T) == 1 ||
52 sizeof(T) == 2 ||
53 sizeof(T) == 4 ||
54 sizeof(T) == 8 ||
55 , "Invalid argument size on boost::fairness::detail::notify_all"
56 );
57 WakeByAddressAll(&mem);
58 }
59
60}
61
62#endif // BOOST_FAIRNESS_WAIT_OPS_WINDOWS_HPP
This file contains configurations about boost and 128bit cpu support. TODO.
Definition coherent_priority_lock.hpp:25
void wait_(T &mem, K expected)
Definition wait_ops_generic.hpp:22
void notify_one_(T &mem)
Definition wait_ops_generic.hpp:31
void notify_all_(T &mem)
Definition wait_ops_generic.hpp:40