Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_exit(3P) — bsd — Apollo Domain/OS SR10.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_create(3P)

pthread_join(3P)

PTHREAD_EXIT(3P)                     BSD                      PTHREAD_EXIT(3P)



NAME
     pthread_exit - Terminates the calling thread

SYNOPSIS
     #include <pthread.h>

     void pthread_exit (status)
     void *status;

DESCRIPTION
     The pthread_exit function terminates the calling thread and saves the
     exit status. This status is thereby made available to any thread that
     joins with this thread (using the pthread_join(3P) function).

     The status argument specifies the exit status of the thread.

     The pthread_exit function is called implicitly when a thread returns from
     the start routine that was used to create the thread; the routine's
     return value serves as the thread's exit status. The process itself exits
     when the last thread calls pthread_exit.  If the last thread to call
     pthread_exit has been detached, the process exit status will be 0 (zero).
     Otherwise, it will be -1.

NOTES
     This interface is based on draft 4 of the IEEE P1003.4a standard, and
     will be changed to conform to the final version.

DIAGNOSTICS
     The pthread_exit function cannot return to its caller.

SEE ALSO
     pthread_create(3P), pthread_join(3P)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026