Sdk condition variable api documentation

API for platform independent mutex synchronization primitive.

Namespace: dmConditionVariable
Include: #include <dmsdk/dlib/condition_variable.h>
FUNCTIONS
dmConditionVariable::HConditionVariable dmConditionVariable::New() create condition variable
void dmConditionVariable::Delete(dmConditionVariable::HConditionVariable mutex) delete condition variable
void dmConditionVariable::Wait(dmConditionVariable::HConditionVariable condition, dmMutex::HMutex mutex) wait for condition variable
void dmConditionVariable::Signal(dmConditionVariable::HConditionVariable condition) signal condition variable
void dmConditionVariable::Broadcast(dmConditionVariable::HConditionVariable condition) broadcast condition variable

Functions

dmConditionVariable::New

dmConditionVariable::HConditionVariable dmConditionVariable::New()

Create a new HConditionVariable

PARAMETERS

RETURNS

dmConditionVariable::HConditionVariable A new ConditionVariable handle.

dmConditionVariable::Delete

void dmConditionVariable::Delete(dmConditionVariable::HConditionVariable mutex)

Deletes a HConditionVariable.

PARAMETERS

dmConditionVariable::HConditionVariable mutex ConditionVariable handle to delete.

dmConditionVariable::Wait

void dmConditionVariable::Wait(dmConditionVariable::HConditionVariable condition, dmMutex::HMutex mutex)

Wait for condition variable. This is a blocking function, and should be called with the mutex being locked.

PARAMETERS

dmConditionVariable::HConditionVariable condition ConditionVariable handle.
dmMutex::HMutex mutex Mutex handle.

dmConditionVariable::Signal

void dmConditionVariable::Signal(dmConditionVariable::HConditionVariable condition)

Signal condition variable, effectively unblocks at least one of the waithing threads blocked by the condition variable.

PARAMETERS

dmConditionVariable::HConditionVariable condition ConditionVariable handle.

dmConditionVariable::Broadcast

void dmConditionVariable::Broadcast(dmConditionVariable::HConditionVariable condition)

Broadcast condition variable, effectively unblocks all of the waithing threads blocked by the condition variable.

PARAMETERS

dmConditionVariable::HConditionVariable condition ConditionVariable handle.