OpenDOF Project
DOF_PCR_DECLSPEC PCRStatus PCRCondition_Wait ( PCRCondition  cond,
PCRMutex  mtx,
uint32  timeout 
)

Wait for a condition to be signaled.

The condition variable and mutex must be valid, and the mutex must already be held (locked) by the calling thread. Furthermore, the condition variable must not be used concurrently with different mutexes.

Note
On some platforms, a spurious wakeup may occur, causing this function to return as if the condition was signaled (when it actually was not). It is strongly encouraged for the caller to test for a separate flag to know for sure whether the signal is meaningful.
Parameters
condCondition for which to wait. Must not be NULL.
mtxLocked mutex associated with condition. Must not be NULL.
timeoutMaximum time to wait, in milliseconds.
Returns
Return value is one of:
  • PCRSTATUS_OK: Condition was signaled.
  • PCRSTATUS_TIMEOUT: Timeout reached; condition was not signaled.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22