Creates a condition variable.
pthread_cond_init(
cond,
attr );
Argument Data Type Access
cond opaque pthread_cond_t write
attr opaque pthread_ read
condattr_t
int pthread_cond_init ( pthread_cond_t *cond, pthread_condattr_t attr);
Condition variables are not owned by a particular thread. Any associated storage is not automatically deallocated when the creating thread terminates.
Return Error Description0 Successful completion. -1 [EAGAIN] The system lacks the necessary resources to initialize another condition variable. The system-imposed limit on the total number of condition variables under execution by a single user is exceeded. -1 [ENOMEM] Insufficient memory exists to initialize the condition variable.