Index of Section 2 Manual Pages

Interix / SUApthread_key_delete.2Interix / SUA

pthread_key_delete(2)                             pthread_key_delete(2)

  pthread_key_delete()

  NAME

    pthread_key_delete() - delete data key

  SYNOPSIS

    #include 

    int pthread_key_delete(pthread_key_t key);

  DESCRIPTION

    The pthread_key_delete(2) function deletes a key previously created by the
    pthread_key_create(2) function. The thread-specific data values associated
    with the key are not required to be null when this function is called. The
    application must free any memory or clean up any data structures related
    to the key or data associated with the key. The application can perform
    this cleanup either before or after calling pthread_key_delete(). An
    application should not delete the key if any thread can attempt to use the
    key after it has been deleted.

    The pthread_key_delete() function can be called within destructor
    functions, but pthread_key_delete() does not call any destructor functions
    itself. After pthread_key_delete() is called for a key, any destructor
    function associated with that key will not be called when when a thread
    with data associated with the key exits.

  RETURN VALUES

    On success, the function returns 0; otherwise, an error code is returned.

  ERRORS

    The pthread_key_delete() function can fail for the following reason:

    [EINVAL]
        The key argument does not identify a valid key.

    This function does not return [EINTR].

  SEE ALSO

    pthread_key_create(2)

  USAGE NOTES

    The pthread_key_delete function is thread safe.

    The pthread_key_delete function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA