#include <pthread.h>
int pthread_key_delete(pthread_key_t key);
The pthread_key_delete()
function deletes a thread-specific data key previously returned
by pthread_key_create(). The thread-specific data values
associated with the key need not be NULL at the time
pthread_key_delete() is called.
It is the responsibility of the application 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 pthread_key_delete(). Any attempt to use the key
following the call to pthread_key_delete() results in
undefined behavior.
pthread_key_delete() can
be called from within destructor functions. No destructor
functions are invoked by pthread_key_delete(). Any
destructor function that may have been associated with the key
is no longer called on thread exit.
- key
-
Is the thread-specific data key to delete.
On success, pthread_key_delete()
returns 0. On error, one of the following values is returned:
- EINVAL
-
key is not a valid thread-specific
data key.
POSIX P1003.1 (1996)
MT-safe.
None.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- pthread_key_create()
PTC MKS Toolkit 10.5 Documentation Build 40.