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

pthread_cond_signal(2) OSS System Calls Reference Manual
NAME
pthread_cond_signal - Unblocks at least one thread that is waiting on the specied condition
variable
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/systemzdllsnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_cond_signal(
pthread_cond_t *cond );
PARAMETERS
cond species the condition variable to be signaled.
DESCRIPTION
This function unblocks at least one thread waiting on the condition variable specied by cond.
Calling this function implies that data guarded by the associated mutex has changed, so one of
the waiting threads might be able to proceed. In general, only one thread is unblocked.
If no threads are waiting on the specied condition variable, this function takes no action. The
signal does not propagate to the next condition variable wait.
The scheduling policy determines which thread is unblocked. A blocked thread is chosen in
priority order, using a rst-in/rst-out (FIFO) algorithm within priorities.
This function can be called by a thread regardless of whether it owns the mutex associated with
the condition variable specied by the cond parameter. However, if predictable scheduling
behavior is required, the mutex must be locked before the pthread_cond_signal() function is
called.
Do not call this function from within an interrupt handler.
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 not a valid condition variable.
[ENOMEM] There is insufcient memory to perform the requested operation.
RELATED INFORMATION
Functions: pthread_cond_broadcast(2), pthread_cond_destroy(2), pthread_cond_init(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.
546 Hewlett-Packard Company 527186-003