Index of Section 2 Manual Pages

Interix / SUApthread_join.2Interix / SUA

pthread_join(2)                                         pthread_join(2)

  pthread_join()

  NAME

    pthread_join() - suspend execution until another thread terminates

  SYNOPSIS

    #include 

    int pthread_join(pthread_t thread, void **value_ptr);

  DESCRIPTION

    The pthread_join(2) function suspends execution of the calling thread
    until the thread identified by the thread argument terminates, unless that
    thread has already terminated. If the value_ptr argument is not null, when
    pthread_join returns, the location referenced by value_ptr contains the
    value passed to pthread_exit(2) when the thread identified by thread
    terminated. If the thread that called pthread_join() is cancelled, the
    thread identified by thread is not detached.

  RETURN VALUES

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

  ERRORS

    The pthread_join() function can fail for the following reasons:

    [EDEADLK]
        A deadlock was detected, or thread identifies the calling thread.

    [EINVAL]
        The thread argument does not identify a joinable thread.

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

    This function does not return [EINTR].

  SEE ALSO

    pthread_create(2)

    pthread_exit(2)

    wait(2)

  USAGE NOTES

    The pthread_join function is thread safe.

    The pthread_join function is not async-signal safe.


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