Open System Services System Calls Reference Manual (G06.25+, H06.03+)

pthread_cond_broadcast(2) OSS System Calls Reference Manual
NAME
pthread_cond_broadcast
- Unblocks all threads that are waiting on the specied condition vari-
able
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_cond_broadcast(
pthread_cond_t *cond );
PARAMETERS
cond species a condition variable upon which the threads (to be awakened) are wait-
ing.
DESCRIPTION
This function unblocks all threads waiting on the condition variable specied by cond. Calling
this function implies that data guarded by the associated mutex has changed, so one or more
waiting threads might be able to proceed. The threads that are unblocked contend for the mutex
according to their respective scheduling policies (if applicable).
This function can be called by a thread regardless of whether it currently owns the mutex associ-
ated with the condition variable specied by cond. However, if predictable scheduling behavior
is required, the mutex must be locked before the pthread_cond_broadcast() function is called.
If no threads are waiting on the specied condition variable, this function takes no action. The
broadcast does not propagate to the next condition variable wait.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The value specied by the cond parameter is invalid.
[ENOMEM] There is insufcient memory to initialize the condition variable specied by the
cond parameter.
RELATED INFORMATION
Functions: pthread_cond_destroy(2), pthread_cond_init(2), pthread_cond_signal(2),
pthread_cond_timedwait(2), pthread_cond_wait(2).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specication. Interfaces documented on this
reference page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header le spthread.h is an HP exception to the POSIX standard. The return of
[ENOMEM] is an HP extension to the POSIX standard.
542 Hewlett-Packard Company 527186-003