VMS Help
POSIX Threads, TIS routines, tis_setspecific

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

    Changes the value associated with the specified thread-specific
    data key.

  1 - C Binding

    #include <tis.h>

    int
    tis_setspecific (
                pthread_key_t   key,
                const void   *value);

  2 - Arguments

 key

    Thread-specific data key that identifies the data to receive
    value. Must be obtained from a call to tis_key_create().

 value

    New value to associate with the specified key. Once set, this
    value can be retrieved using the same key in a call to tis_
    getspecific().

  3 - Description

    This routine sets the value associated with the specified thread-
    specific data key. If a value is defined for the key (that is,
    the current value is not NULL), the new value is substituted for
    it. The key is obtained by a previous call to tis_key_create().

    Do not call this routine from a data destructor function. Doing
    so could lead to a memory leak or an infinite loop.

  4 - Return Values

    If an error condition occurs, this routine returns an integer
    indicating the type of error. Possible return values are as
    follows:

    Return      Description

    0           Successful completion.
    [EINVAL]    The value specified by key is not a valid key.
    [ENOMEM]    Insufficient memory to associate the value with the
                key.

  5 - Associated Routines

       tis_getspecific()
       tis_key_create()
       tis_key_delete()
  Close     HLB-list     TLB-list     Help  

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