cond_broadcast(3synch) cond_broadcast(3synch)
NAME
cond_broadcast - broadcast a wake up to all threads waiting on
a condition variable
SYNOPSIS
cc [options] -Kthread file
#include <synch.h>
int cond_broadcast(cond_t *cond);
Parameters
cond pointer to condition variable to be broadcast
DESCRIPTION
cond_broadcast wakes up all threads waiting on the condition
cond. If more than one thread is waiting, the order of
release from the blocked group is scheduling policy-specific
for/bound threads, and may depend on scheduling parameters for
multiplexed threads.
cond_broadcast has no effect if there are no threads waiting
on cond.
A cond_broadcast will be more reliable if the associated mutex
used by waiters is held across the call.
cond Parameter
The condition variable denoted by cond must previously have
been initialized (see cond_init).
Return Values
cond_broadcast returns zero for success and an error number
for failure, as described below.
Errors
If any of the following conditions is detected, cond_broadcast
returns the corresponding value:
EINVAL Invalid argument specified.
USAGE
See the description of how to use condition variables under
USAGE on cond_init(3synch).
REFERENCES
condition(3synch), cond_destroy(3synch), cond_init(3synch),
cond_signal(3synch), cond_timedwait(3synch),
Copyright 1994 Novell, Inc. Page 1
cond_broadcast(3synch) cond_broadcast(3synch)
cond_wait(3synch), synch(3synch)
Copyright 1994 Novell, Inc. Page 2