Condition Variable

<dmsdk/dlib/condition_variable.h>

API for platform independent mutex synchronization primitive.

dmConditionVariable::Broadcast()

broadcast condition variable

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

PARAMETERS

condition -

dmConditionVariable::HConditionVariable ConditionVariable handle.


dmConditionVariable::Delete()

delete condition variable

Deletes a HConditionVariable.

PARAMETERS

mutex -

dmConditionVariable::HConditionVariable ConditionVariable handle to delete.


dmConditionVariable::HConditionVariable

HConditionVariable type definition

typedef struct ConditionVariable* HConditionVariable;


dmConditionVariable::New()

create condition variable

Create a new HConditionVariable

RETURN

condition_variable -

dmConditionVariable::HConditionVariable A new ConditionVariable handle.


dmConditionVariable::Signal()

signal condition variable

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

PARAMETERS

condition -

dmConditionVariable::HConditionVariable ConditionVariable handle.


dmConditionVariable::Wait()

wait for condition variable

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

PARAMETERS

condition -

dmConditionVariable::HConditionVariable ConditionVariable handle.

mutex -

dmMutex::HMutex Mutex handle.