Use cond_wait(3C) to atomically release the mutex pointed to by mp and cause the calling thread to block on the condition variable pointed to by cv. The blocked thread can be awakened by cond_signal(), cond_broadcast() , or when interrupted by delivery of a signal or a fork().
cond_wait() always returns with the mutex locked and owned by the calling thread, even when returning an error.
#include <thread.h> int cond_wait(cond_t *cv, mutex_t *mp);
cv points to an illegal address.
The wait was interrupted by a signal.