Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (n - p) pthread_cond_destroy(2)
NAME
pthread_cond_destroy - Destroys a condition variable
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_destroy(
pthread_cond_t *cond );
PARAMETERS
cond specifies the condition variable to be destroyed.
DESCRIPTION
This function destroys the condition variable specified by the cond parameter. This function
effectively uninitializes the condition variable. Call this function when a condition variable will
no longer be referenced. Destroying a condition variable allows the system to reclaim internal
memory associated with the condition variable.
It is safe to destroy an initialized condition variable upon which no threads are currently blocked.
Attempting to destroy a condition variable upon which other threads are blocked results in an
error and returns the value of [EBUSY].
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.
[EBUSY] The object referenced by cond is being referenced by another thread that is
currently executing pthread_cond_wait() or pthread_cond_timedwait() on
the condition variable specified in cond.
[EINVAL] The value specified by the cond parameter is invalid.
RELATED INFORMATION
Functions: pthread_cond_broadcast(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 specification. 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 file spthread.h is an HP exception to the POSIX standard.
527186-003 Hewlett-Packard Company 5−43