Open System Services System Calls Reference Manual (G06.25+, H06.03+)
pthread_mutex_destroy(2) OSS System Calls Reference Manual
NAME
pthread_mutex_destroy
- Destroys a mutex
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_mutex_destroy(
pthread_mutex_t *mutex);
PARAMETERS
mutex specifies the mutex to be destroyed.
DESCRIPTION
This function destroys the specified mutex by uninitializing it. Call this function when your pro-
gram no longer needs the specified mutex object.
After this function is called, the system might reclaim the storage used by the destroyed mutex.
Destroying an initialized mutex that is unlocked is safe. Destroying a locked mutex is not
allowed.
NOTES
The results of this function are unpredictable if the mutex object specified by the mutex parame-
ter does not exist or is not initialized.
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] An attempt was made to destroy the mutex indicated by the mutex parameter
while it is locked or referenced.
[EINVAL] The value specified for the mutex parameter is invalid.
RELATED INFORMATION
Functions: pthread_mutex_init(2), pthread_mutex_lock(2), pthread_mutex_trylock(2),
pthread_mutex_unlock(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.
5−76 Hewlett-Packard Company 527186-003