pthread_getspecific()

get thread-specific data 

Function


SYNOPSIS

#include <pthread.h>

void *pthread_getspecific(pthread_key_t key);


DESCRIPTION

The pthread_getspecific() function returns the value currently associated with the specified thread-specific data key. The effect of calling pthread_getspecific() with a key value not obtained from pthread_key_create() or after the key has been deleted with pthread_key_delete() is undefined. pthread_getspecific() may be called from a thread-specific data destructor function.


PARAMETERS

key 

Is the thread-specific data key whose value should be obtained.


RETURN VALUES

The value currently associated with key for the current thread, or NULL if no value has been set.


CONFORMANCE

POSIX P1003.1 (1996)


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_key_create(), pthread_key_delete(), pthread_setspecific()


PTC MKS Toolkit 10.3 Documentation Build 39.