Causes a thread to wait for a condition variable to be signaled or broadcasted for a specified period of time.
cma_cond_timed_wait( condition, mutex, expiration);
Argument Data Type Accesscondition opaque cma_t_cond read mutex opaque cma_t_mutex read expiration opaque cma_t_date_time read
#includecma_t_status cma_cond_timed_wait ( cma_t_cond *condition, cma_t_mutex *mutex, cma_t_date_time *expiration);
This routine is identical to cma_cond_wait except that this routine can return before a condition variable is signaled or broadcasted, specifically, when a specified time expires.
Valid return values are cma_s_normal and cma_s_timed_out. If the wait is completed normally by a signal or broadcast on the condition variable, the return status is cma_s_normal. If the wait completes because the expiration time has passed, the return status is cma_s_ timed_out.
If the current time equals or exceeds the expiration time, this routine returns immediately, without causing the current thread to wait. Your code should check the return status whenever this routine returns and take the appropriate action. Otherwise, waiting on the condition variable can become a nonblocking loop.
Call this routine after you have locked the mutex specified in mutex. The results of this routine are unpredictable if this routine is called without first locking the mutex.
cma_e_alerted cma_e_existence cma_e_use_error