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> {
158 ConditionImpl(
const ConditionImpl&);
159 ConditionImpl& operator=(
const ConditionImpl&);
163 enum { e_TIMED_OUT = -1 };
210 int wait(Mutex *mutex);
237ConditionImpl<bslmt::Platform::Win32Threads>::ConditionImpl(
239: d_clockType(clockType)
241 InitializeConditionVariable(
242 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
246ConditionImpl<bslmt::Platform::Win32Threads>::~ConditionImpl()
252void ConditionImpl<bslmt::Platform::Win32Threads>::broadcast()
254 WakeAllConditionVariable(
255 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
259void ConditionImpl<bslmt::Platform::Win32Threads>::signal()
261 WakeConditionVariable(
262 reinterpret_cast<_RTL_CONDITION_VARIABLE *
>(&d_cond));
268ConditionImpl<bslmt::Platform::Win32Threads>::clockType()
const
Definition bsls_timeinterval.h:301
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bslmt_barrier.h:344
Enum
Definition bsls_systemclocktype.h:117
@ e_REALTIME
Definition bsls_systemclocktype.h:120