thr_setspecific(3THR) binds value to the thread-specific data key, key, for the calling thread. (For POSIX threads, see pthread_setspecific(3THR).)
#include <thread.h> int thr_setspecific(thread_key_t key, void *value);