Initializes a specified condition variable.
#include <pthread.h> int pthread_cond_init ( pthread_cond_t *cond, const pthread_condattr_t *attr);
(IN) Points to the condition variable to be initialized.
(IN) Points to a structure containing the condition variable attributes. If NULL, the condition variable is initialized as private (PTHREAD_PROCESS_PRIVATE). On NetWare, condition variables cannot currently be shared.
If successful, returns zero; otherwise, returns a nonzero error code:
Condition variables can be used to support event-based synchronization where a lock or a semaphore might not be appropriate.
If you call pthread_cond_init on a previously initialized condition variable, no warning is given unless you are in DEBUG mode.