thr_setspecific(3scl)thr_setspecific(3scl)NAMEthr_setspecific - Sets the thread-specific data for the specified key.
LIBRARY
SCL Threads Library (libthread.so)
SYNOPSIS
#include <thread.h>
int thr_setspecific(
thread_key_t key,
const void *value );
PARAMETERS
Identifies the key for which the thread-specific data is set. New
thread-specific data value to associate with the specified key for the
current thread.
DESCRIPTION
This routine sets thread-specific data for the specified key for the
current thread.
Keys are created by calls to thr_keycreate(3scl). Once thread-specific
data has been set for a thread, it can be obtained by calling thr_get‐
specific(3scl).
SCL IMPLEMENTATION NOTESthr_setspecific(3scl) is implemented by calling pthread_setspecific(3).
RETURN VALUES
If an error condition occurs, this routine returns an integer value
indicating the type of error.
Additional error return information may be written to the SCL error
log. Refer to scl_error_log(4scl) for details.
Possible return values are as follows: Successful completion. Insuffi‐
cient memory exists to associate value with key. Or:
An internal implementation error occurred. Refer to the SCL errorlog
for additional information. The specified key is invalid.
ERRORS
None.
RELATED INFORMATION
Functions: pthread_key_create(3), pthread_getspecific(3), pthread_set‐
specific(3), scl_intro(3scl), scl_thread_intro(3scl), thr_keycre‐
ate(3scl), thr_getspecific(3scl)
Files: scl_error_log(4scl)
Manuals: Solaris Compatibility Libraries User's Guide
thr_setspecific(3scl)