1
<!-- manual page source format generated by PolyglotMan v3.2, -->
2
<!-- available at http://polyglotman.sourceforge.net/ -->
6
<title>PTHREAD_EXIT(3) manual page</title>
9
<a href='#toc'>Table of Contents</a><p>
12
<h2><a name='sect0' href='#toc0'>Name</a></h2>
13
pthread_exit - terminate the calling thread
15
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
16
<b>#include <pthread.h></b>
18
<p> <b>void pthread_exit(void *</b><i>retval</i><b>);</b>
20
<h2><a name='sect2' href='#toc2'>Description</a></h2>
21
<b>pthread_exit</b> terminates the
22
execution of the calling thread. All cleanup handlers that have been set
23
for the calling thread with <a href='file:pthread_cleanup_push.html'><b>pthread_cleanup_push</b>(3)</a>
24
are executed in reverse
25
order (the most recently pushed handler is executed first). Finalization
26
functions for thread-specific data are then called for all keys that have
27
non- <b>NULL</b> values associated with them in the calling thread (see <a href='file:pthread_key_create.html'><b>pthread_key_create</b>(3)</a>
29
Finally, execution of the calling thread is stopped.
30
<p> The <i>retval</i> argument
31
is the return value of the thread. It can be consulted from another thread
32
using <a href='file:pthread_join.html'><b>pthread_join</b>(3)</a>
35
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
36
The <b>pthread_exit</b> function never returns.
39
<h2><a name='sect4' href='#toc4'>Author</a></h2>
40
Xavier Leroy <Xavier.Leroy@inria.fr>
42
<h2><a name='sect5' href='#toc5'>See Also</a></h2>
43
<a href='file:pthread_create.html'><b>pthread_create</b>(3)</a>
44
, <a href='file:pthread_join.html'><b>pthread_join</b>(3)</a>
49
<a name='toc'><b>Table of Contents</b></a><p>
51
<li><a name='toc0' href='#sect0'>Name</a></li>
52
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
53
<li><a name='toc2' href='#sect2'>Description</a></li>
54
<li><a name='toc3' href='#sect3'>Return Value</a></li>
55
<li><a name='toc4' href='#sect4'>Author</a></li>
56
<li><a name='toc5' href='#sect5'>See Also</a></li>