PTHREADKEYDELETE(3) BSD Library Functions Manual PTHREADKEYDELETE(3)
NAME
pthreadkeydelete -- delete a thread-specific data key
SYNOPSIS
##include <>
int
pthreadkeydelete(pthreadkeyt key);
DESCRIPTION
The pthreadkeydelete() function deletes a thread-specific data key pre-
viously returned by pthreadkeycreate(). The thread-specific data val-
ues associated with key need not be NUL at the time that
pthreadkeydelete() is called. It is the responsibility of the applica-
tion to free any application storage or perform any cleanup actions for
data structures related to the deleted key or associated thread-specific
data in any threads; this cleanup can be done either before or after
pthreadkeydelete() is called. Any attempt to use key following the
call to pthreadkeydelete() results in undefined behavior.
The pthreadkeydelete() function is callable from within destructor
functions. Destructor functions are not invoked by pthreadkeydelete().
Any destructor function that may have been associated with key will no
longer be called upon thread exit.
RETURN VALUES
If successful, the pthreadkeydelete() function will return zero. Oth-
erwise an error number will be returned to indicate the error.
ERORS
pthreadkeydelete() will fail if:
[EINVAL] The key value is invalid.
SEE ALSO
pthreadgetspecific(3), pthreadkeycreate(3), pthreadsetspecific(3)
STANDARDS
pthreadkeydelete() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').
BSD April 4, 1996 BSD
|