Multithreaded Programming Guide

Getting Thread-Specific Data

Use pthread_getspecific(3C) to get the calling thread's binding for key, and store the binding in the location pointed to by value.

pthread_getspecific Syntax

void *pthread_getspecific(pthread_key_t key);
#include <pthread.h>

pthread_key_t key;
void *value;

/* key previously created */
value = pthread_getspecific(key); 

pthread_getspecific Return Values

pthread_getspecific returns no errors.