WakeConditionVariable
WakeConditionVariable wakes at most one thread waiting on the condition variable. The selection is in FIFO order (i.e., the first thread to wait is the first to be awakened).
Syntax
VOID WakeConditionVariable(
PCONDITION_VARIABLE pConditionVariable
);
Parameters
pConditionVariable
A pointer to the condition variable.
Return Value
This function does not return a value.
Remarks
- This function wakes one thread at most.
- Selection is in FIFO order (first-in, first-out).
- This function does nothing if no threads are waiting.
- The awakened thread must reacquire the associated lock.
- This function raises EXCEPTION_ACCESS_VIOLATION if pConditionVariable is NULL.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.1 SDK |
windows.h |
wRTOS_rtss.lib |
Example
AcquireSRWLockExclusive(&lock);
dataReady = TRUE;
WakeConditionVariable(&cv); // Wake one waiter
ReleaseSRWLockExclusive(&lock);
See Also:
- RTL_CONDITION_VARIABLE
- InitializeConditionVariable
- SleepConditionVariableCS
- SleepConditionVariableSRW
- WakeConditionVariable