Multithreaded Programming Guide

Get the Thread-Specific Data Key

thr_getspecific(3THR)

thr_getspecific(3THR) stores the current value bound to key for the calling thread into the location pointed to by valuep. (For POSIX threads, see "pthread_getspecific(3THR)".)

#include <thread.h>

int thr_getspecific(thread_key_t key, void **valuep);