int
pthread_cond_broadcast(
pthread_cond_t *cond
)
int
pthread_cond_signal(
pthread_cond_t *cond
)
)
function unblocks all threads waiting for the condition variable
cond
.
If no threads are waiting on
cond
,
the
pthread_cond_broadcast(
)
function has no effect.
The
pthread_cond_signal()
function unblocks one thread waiting for the condition variable
cond
.
If no threads are waiting on
cond
,
the
pthread_cond_signal()
function has no effect.
When calling
pthread_cond_wait()
and/or
pthread_cond_timedwait(
),
a temporary binding is established between the condition variable
cond
and a caller-supplied mutex.
The same mutex must be held while calling
pthread_cond_broadcast()
and
pthread_cond_signal(
).
Neither function enforces this requirement, but if the mutex is not
held the resulting behaviour is undefined.
)
and
pthread_cond_signal(
)
functions will return zero, otherwise an error number will be returned
to indicate the error.
)
and
pthread_cond_signal(
)
may fail if:
EINVAL
]
cond
is invalid.
)
and
pthread_cond_signal(
)
conform to
ISO/IEC 9945-1:1996 (``POSIX.1'') .