Open System Services System Calls Reference Manual (G06.25+, H06.03+)
pthread_key_delete(2) OSS System Calls Reference Manual
NAME
pthread_key_delete - Deletes a thread-specific data key
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_key_delete(
pthread_key_t key);
PARAMETERS
key specifies the thread-specific data key to be deleted.
DESCRIPTION
This function deletes the thread-specific data key specified by the key parameter, which must
have been previously returned by the pthread_key_create()
function.
The thread-specific data values associated with the specified key need not be NULL at the time
this function is called. The application must free any application storage or perform any cleanup
actions for data structures related to the deleted key or associated thread-specific data in any
threads. This cleanup can be done either before or after this function is called.
No destructor routines are invoked by this function. Any destructor routines that might have
been associated with the specified key are not called upon thread exit. pthread_key_delete()
can be called from within destructor routines.
NOTES
Do not attempt to use the deleted key after calling this function; unpredictable behavior results.
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 specified for the key parameter is invalid.
RELATED INFORMATION
Functions: pthread_exit(2), pthread_getspecific(2), pthread_key_create(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−72 Hewlett-Packard Company 527186-003