HP-UX Reference (11i v2 07/12) - 3 Library Functions N-Z (vol 7)

p
pthread_key_create(3T) pthread_key_create(3T)
(Pthread Library)
The pthread_key_delete()
function can be called from a destructor function.
RETURN VALUE
If successful,
pthread_key_create()
and pthread_key_delete()
return zero. Otherwise, an
error number is returned to indicate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the
pthread_key_create()
function returns the corresponding error
number:
[EINVAL] The value specified by key is invalid.
[EAGAIN] The necessary resources to create another thread-specific data key are not available,
or the total number of keys per process has exceeded
PTHREAD_KEYS_MAX
or an
invalid value is specified with the environment variable
PTHREAD_USER_KEYS_MAX
.
[ENOMEM] There is insufficient memory available in which to create key.
For each of the following conditions, if the condition is detected, the
pthread_key_delete()
function
returns the corresponding error number:
[EINVAL] The value specified by key is invalid.
AUTHOR
pthread_key_create()
and pthread_key_delete() were derived from the IEEE POSIX
P1003.1c standard.
SEE ALSO
pthread_getspecific(3T), pthread_setspecific(3T).
STANDARDS CONFORMANCE
pthread_key_create()
: POSIX 1003.1c.
pthread_key_delete()
: POSIX 1003.1c.
226 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: December 2007 Update