Associates the specified value with the specified key for the calling context.
#include <thread.h>
int thr_setspecific (
thread_key_t key,
void *value);
(IN) Specifies the key for which the value is to be set.
(IN) Points to the value to be associated with the specified key. NULL is the default initial value that is associated with each thread for an allocated key.
If successful, returns 0; otherwise, returns a nonzero error code:
The value set by calling thr_setspecific can be returned later by calling thr_getspecific.