Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (n - p) pthread_getspeci
fic(2)
NAME
pthread_getspecific - Obtains the thread-specific data associated with a key
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
void *pthread_getspecific(
pthread_key_t key );
PARAMETERS
key specifies the context key that identifies the thread-specific data to be obtained.
DESCRIPTION
This function obtains the thread-specific data bound to the key specified by the key parameter for
the calling thread. Obtain this key by calling the pthread_key_create()
function.
This function can be called from a thread-specific data-destructor routine.
RETURN VALUES
This function returns the thread-specific data associated with key. If no thread-specific data is
associated with key or if key is not defined, then this function returns a NULL value.
RELATED INFORMATION
Functions: pthread_key_create(2), pthread_setspecific(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−67