#include <pthread.h>
int pthread_cond_broadcast(pthread_cond_t *cond);
The pthread_cond_broadcast()
function unblocks all threads blocked on the specified condition
variable. The function has no effect if no threads are blocked on
the condition variable. pthread_cond_broadcast() may be
called by a thread whether or not it owns the mutex which threads
calling pthread_cond_wait() or pthread_cond_timedwait()
have associated with the condition variable during their waits.
However, if predictable scheduling behavior is required, then
that mutex should be locked by the thread calling
pthread_cond_broadcast().
- cond
-
Is the condition variable to broadcast.
On success, pthread_cond_broadcast()
returns 0. On error, one of the following values is returned:
- EINVAL
-
cond does not refer to an
initialized condition variable.
- EFAULT
-
cond is an invalid pointer.
POSIX P1003.1 (1996)
MT-safe.
None.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- pthread_cond_init(), pthread_cond_signal(), pthread_cond_timedwait(), pthread_cond_wait()
MKS Toolkit 9.2 Documentation Build 16.