NAME
pptthhrreeaaddsseettssppeecciiffiicc - set a thread-specific data value
SYNOPSIS
##iinncclluuddee <
int pptthhrreeaaddsseettssppeecciiffiicc(pthreadkeyt key, const void *value);> DESCRIPTION
The pptthhrreeaaddsseettssppeecciiffiicc() function associates a thread-specific value
with a key obtained via a previous call to pptthhrreeaaddkkeeyyccrreeaattee(). Differ-
ent threads man bind different values to the same key. These values are typically pointers to blocks of dynamically allocated memory that have been reserved for use by the calling thread. The effect of calling pptthhrreeaaddsseettssppeecciiffiicc() with a key value not obtained from pptthhrreeaaddkkeeyyccrreeaattee() or after key has been deleted with pptthhrreeaaddkkeeyyddeelleettee() is undefined.pptthhrreeaaddsseettssppeecciiffiicc() may be called from a thread-specific data destruc-
tor function, however this may result in lost storage or infinite loops.RETURN VALUES
If successful, the pptthhrreeaaddsseettssppeecciiffiicc() function will return zero. Otherwise an error number will be returned to indicate the error. EERRRROORRSS pptthhrreeaaddsseettssppeecciiffiicc() will fail if: [ENOMEM] Insufficient memory exists to associate the value with the key. [EINVAL] The key value is invalid.SEE ALSO
pthreadgetspecific(3), pthreadkeycreate(3), pthreadkeydelete(3) STANDARDSpptthhrreeaaddsseettssppeecciiffiicc() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').
BSD April 4, 1996 BSD