63 lines
1.1 KiB
Plaintext
63 lines
1.1 KiB
Plaintext
'\"macro stdmacro
|
|
.\"
|
|
.\" ----------------
|
|
.TH pthread_key_delete 3P
|
|
.\"
|
|
.\" ----------------
|
|
.SH NAME
|
|
pthread_key_delete \- thread-specific data key deletion
|
|
.\"
|
|
.\" ----------------
|
|
.Op c p a
|
|
.SH C SYNOPSIS
|
|
.nf
|
|
.ft 3
|
|
#include <pthread.h>
|
|
.sp .8v
|
|
int pthread_key_delete(pthread_key_t key);
|
|
.ft 1
|
|
.fi
|
|
.Op
|
|
.\"
|
|
.\" ----------------
|
|
.SH DESCRIPTION
|
|
The
|
|
.IR pthread_key_delete ()
|
|
function deletes a
|
|
.I key
|
|
that was previously returned by
|
|
.IR pthread_key_create ().
|
|
.PP
|
|
.PP
|
|
When
|
|
.I key
|
|
is deleted, the associated destructor (if any) is not called by
|
|
.IR pthread_key_delete ()
|
|
nor will it be called upon thread exit [see
|
|
.IR pthread_exit ()].
|
|
It is the responsibility of the user program to free up any storage that is
|
|
referenced by
|
|
.IR key .
|
|
.PP
|
|
The use of
|
|
.I key
|
|
after the call to
|
|
.IR pthread_key_delete ()
|
|
will result in undefined behavior.
|
|
.\"
|
|
.\" ----------------
|
|
.SH DIAGNOSTICS
|
|
On success,
|
|
.IR pthread_key_delete ()
|
|
returns zero; otherwise, an error number is returned:
|
|
.\"
|
|
.TP 15
|
|
.B [EINVAL]
|
|
The value specified by
|
|
.I key
|
|
is invalid.
|
|
.\"
|
|
.\" ----------------
|
|
.SH "SEE ALSO"
|
|
pthread_key_create(3P), pthread_exit(3P).
|