VMS Help
DCE_THREADS, Application Routines, pthread_setspecific

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  NAME

      pthread_setspecific - Sets the thread-specific data associated
                            with the specified key for the current thread

  SYNOPSIS

      #include <pthread.h>

      int pthread_setspecific( pthread_key_t  key,
                               pthread_addr_t value );

  PARAMETERS

      key                Context key value that uniquely identifies the
                         context value specified in value. This key value
                         must have been obtained from pthread_keycreate().

      value              Address containing data to be associated with the
                         specified key for the current thread; this is the
                         thread-specific data.

  DESCRIPTION

  The pthread_setspecific() routine sets the thread-specific data associ-
  ated with the specified key for the current thread. If a value has
  already been defined for the key in this thread, the new value is sub-
  stituted for it.

  Different threads can bind different values to the same key. These
  values are typically pointers to blocks of dynamically allocated memory
  that are reserved for use by the calling thread.

  RETURN VALUES

  If the function fails, errno may be set to one of the following values:

    Return   Error      Description
    _____________________________________________
     0                  Successful completion.

    -1      [EINVAL]    The key value is invalid.

  RELATED INFORMATION

      FUNCTIONS:  pthread_getspecific
                  pthread_keycreate
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.