thr_keydelete(THREAD)
thr_keydelete --
thread-specific data key
Synopsis
cc [options] -Kthread file
#include <thread.h>
int thr_keydelete(thread_key_t key)
Description
thr_keydelete deletes the specified key,
which was obtained from a previous call to thr_keycreate.
Parameters
key-
the key to be deleted
key parameter
key is the key to be deleted.
key must no longer be in use,
that is, no thread can have a non-NULL value
bound to key,
otherwise thr_keydelete will return EBUSY.
Usage
A typical use would be for a dynamically linked library
to create its private key with thr_keycreate as part
of its initialization,
use thr_getspecific and thr_setspecific while in use,
and then call thr_keydelete before unlinking.
The application should ensure that
other thread-specific data functions for key
are not called concurrently with thr_keydelete.
Return values
thr_keydelete returns zero for success
and an error number for failure, as described below.
Errors
If any of the following conditions occur,
thr_keydelete returns the corresponding value:
EBUSY-
key has thread-specific data associated with it.
EINVAL-
key is invalid.
References
Intro(THREAD),
thr_getspecific(THREAD),
thr_keycreate(THREAD),
thr_setspecific(THREAD)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005