Index of Section 2 Manual Pages

Interix / SUApthread_cancel.2Interix / SUA

pthread_cancel(2)                                     pthread_cancel(2)

  pthread_cancel()

  NAME

    pthread_cancel() - request cancellation of a thread's execution

  SYNOPSIS

    #include 

    int pthread_cancel(pthread_t thread);

  DESCRIPTION

    The pthread_cancel(2) function requests that the execution of the thread
    identified by the thread argument be terminated. When the cancellation
    occurs depends on the thread's state and type. When the cancellation takes
    place, the thread's cancellation cleanup handlers are called, followed by
    the thread-specific data-destructor functions. When the last data-
    destructor function returns, the thread is cancelled.

    The cancellation process runs asynchronously with respect to the process
    that called pthread_cancel().

  RETURN VALUES

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

  ERRORS

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

    [ESRCH]
        The thread argument does not identify an existing thread.

    This function does not return [EINTR].

  SEE ALSO

    pthread_cleanup_pop(2)

    pthread_cond_timedwait(2)

    pthread_exit(2)

    pthread_join(2)

    pthread_setcancelstate(2)

  USAGE NOTES

    The pthread_cancel function is thread safe.

    The pthread_cancel function is not async-signal safe.


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