8#ifndef INCLUDED_BSLMT_CONDITIONIMPL_WIN32
9#define INCLUDED_BSLMT_CONDITIONIMPL_WIN32
84#include <bslscm_version.h>
88#ifdef BSLMT_PLATFORM_WIN32_THREADS
96#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
103struct _RTL_CONDITION_VARIABLE;
104struct _RTL_CRITICAL_SECTION;
106typedef struct _RTL_CONDITION_VARIABLE CONDITION_VARIABLE,
107 *PCONDITION_VARIABLE;
108typedef struct _RTL_CRITICAL_SECTION CRITICAL_SECTION, *LPCRITICAL_SECTION;
110typedef unsigned long DWORD;
113 __declspec(dllimport) BOOL __stdcall SleepConditionVariableCS(
114 PCONDITION_VARIABLE ConditionVariable,
115 LPCRITICAL_SECTION CriticalSection,
116 DWORD dwMilliseconds);
119 __declspec(dllimport)
void __stdcall InitializeConditionVariable(
120 PCONDITION_VARIABLE ConditionVariable);
122 __declspec(dllimport)
void __stdcall WakeConditionVariable(
123 PCONDITION_VARIABLE ConditionVariable);
125 __declspec(dllimport)
void __stdcall WakeAllConditionVariable(
126 PCONDITION_VARIABLE ConditionVariable);
128 __declspec(dllimport) DWORD __stdcall GetLastError();
135template <
class THREAD_POLICY>
145class ConditionImpl<Platform::Win32Threads> {
159 ConditionImpl(
const ConditionImpl&);
160 ConditionImpl& operator=(
const ConditionImpl&);
164 enum { e_TIMED_OUT = -1 };
211 int wait(Mutex *mutex);
238ConditionImpl<bslmt::Platform::Win32Threads>::ConditionImpl(
240: d_clockType(clockType)
242 InitializeConditionVariable(
243 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
247ConditionImpl<bslmt::Platform::Win32Threads>::~ConditionImpl()
253void ConditionImpl<bslmt::Platform::Win32Threads>::broadcast()
255 WakeAllConditionVariable(
256 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
260void ConditionImpl<bslmt::Platform::Win32Threads>::signal()
262 WakeConditionVariable(
263 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
269ConditionImpl<bslmt::Platform::Win32Threads>::clockType()
const
Definition bsls_timeinterval.h:307
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bslmt_barrier.h:344
Enum
Definition bsls_systemclocktype.h:119
@ e_REALTIME
Definition bsls_systemclocktype.h:122