Deletes a thread-specific data key.
Threads Library (libpthreads.a)
#include <pthread.h>
int pthread_key_delete (key)
pthread_key_t key;
The pthread_key_delete subroutine deletes the thread-specific data key key, previously created with the pthread_key_create subroutine. The application must ensure that no thread-specific data is associated with the key. No destructor routine is called.
Item | Description |
---|---|
key | Specifies the key to delete. |
If successful, the pthread_key_delete function returns zero. Otherwise, an error number is returned to indicate the error.
The pthread_key_delete function will fail if:
Item | Description |
---|---|
EINVAL | The key value is invalid. |
The pthread_key_delete function will not return an error code of EINTR.