pthread_cond_broadcast(3thr)pthread_cond_broadcast(3thr)Namepthread_cond_broadcast - Wakes all threads that are waiting on a condi‐
tion variable.
Syntax
#include <pthread.h>
int pthread_cond_broadcast (cond)
pthread_cond_t *cond;
Arguments
cond Condition variable broadcast.
Description
This routine wakes all threads waiting on a condition variable. Call‐
ing this routine implies that data guarded by the associated mutex has
changed so that it might be possible for one or more waiting threads to
proceed. If any waiting thread might be able to proceed, call
pthread_cond_signal.
Call this routine when the associated mutex is either locked or
unlocked.
Return Values
If an error condition occurs, this routine returns -1 and sets errno to
the corresponding error value. Possible return values are as follows.
Return Error Description
0 Successful comple‐
tion.
-1 [EINVAL] The value specified
by cond is invalid.
pthread_cond_broadcast(3thr)