|
NAMEpthread_setspecific —
set a thread-specific data value
LIBRARYPOSIX Threads Library (libpthread, -lpthread)SYNOPSIS#include <pthread.h>
int
DESCRIPTIONThepthread_setspecific () function associates a
thread-specific value with a key obtained via a previous
call to pthread_key_create (). Different threads can
bind different values to the same key. These values are typically pointers to
blocks of dynamically allocated memory that have been reserved for use by the
calling thread.
The effect of calling
The RETURN VALUESIf successful, thepthread_setspecific () function will
return zero. Otherwise an error number will be returned to indicate the error.
ERRORSThepthread_setspecific () function will fail if:
SEE ALSOpthread_getspecific(3), pthread_key_create(3), pthread_key_delete(3)STANDARDSThepthread_setspecific () function conforms to
ISO/IEC 9945-1:1996 (“POSIX.1”).
Visit the GSP FreeBSD Man Page Interface. |