Multithreaded Programming Guide

Get the Thread-Specific Data Key

thr_getspecific(3T)

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

#include <thread.h>

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