Multithreaded Programming Guide

Get the Thread-Specific Data Key

thr_getspecific(3T)

thr_getspecific() stores the current value bound to key for the calling thread into the location pointed to by valuep.

#include <thread.h>

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