summaryrefslogtreecommitdiff
path: root/manual/pthread_detach.html
diff options
context:
space:
mode:
authorrpj <rpj>2005-05-17 16:35:31 +0000
committerrpj <rpj>2005-05-17 16:35:31 +0000
commit05c1a8d501dbdbfbf2224db0bbe83cb2ac4031c6 (patch)
tree98c4ac2c17f7d54d3b953f4bce63810b2a18e6dc /manual/pthread_detach.html
parent8d02bd1e36ce8ddf7dd99af9af4123bb32e35a44 (diff)
''
Diffstat (limited to 'manual/pthread_detach.html')
-rw-r--r--manual/pthread_detach.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/manual/pthread_detach.html b/manual/pthread_detach.html
index 265a467..47c22cf 100644
--- a/manual/pthread_detach.html
+++ b/manual/pthread_detach.html
@@ -5,7 +5,7 @@
<TITLE>PTHREAD_DETACH(3) manual page</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
<META NAME="CREATED" CONTENT="20050504;18010700">
- <META NAME="CHANGED" CONTENT="20050504;18032100">
+ <META NAME="CHANGED" CONTENT="20050518;2342300">
<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->
</HEAD>
@@ -23,11 +23,12 @@
</P>
<H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
<P><B>pthread_detach</B> puts the thread <I>th</I> in the detached
-state. This guarantees that the memory resources consumed by <I>th</I>
-will be freed immediately when <I>th</I> terminates. However, this
+state. This guarantees that the resources consumed by <I>th</I> will
+be freed immediately when <I>th</I> terminates. However, this
prevents other threads from synchronizing on the termination of <I>th</I>
-using <B>pthread_join</B>.
-</P>
+using <B>pthread_join</B>. If, when <B>pthread_detach</B> is called,
+<I>th</I> has already terminated, all of <I>th</I>'s remaining
+resources will be freed.</P>
<P>A thread can be created initially in the detached state, using the
<B>detachstate</B> attribute to <A HREF="pthread_create.html"><B>pthread_create</B>(3)</A>
. In contrast, <B>pthread_detach</B> applies to threads created in
@@ -37,8 +38,9 @@ later.
<P>After <B>pthread_detach</B> completes, subsequent attempts to
perform <B>pthread_join</B> on <I>th</I> will fail. If another thread
is already joining the thread <I>th</I> at the time <B>pthread_detach</B>
-is called, <B>pthread_detach</B> does nothing and leaves <I>th</I> in
-the joinable state.
+is called, <I>th</I> will be detached and <B>pthread_join</B><SPAN STYLE="font-weight: medium">
+will eventually return when <I>th</I> terminates but may not return
+with <I>th</I>'s correct return code.</SPAN>
</P>
<H2><A HREF="#toc3" NAME="sect3">Return Value</A></H2>
<P>On success, 0 is returned. On error, a non-zero error code is
@@ -58,6 +60,7 @@ returned.
<A HREF="#toc5" NAME="sect5">Author</A></H2>
<P>Xavier Leroy &lt;Xavier.Leroy@inria.fr&gt;
</P>
+<P>Modified by Ross Johnson for use with Pthreads-w32.</P>
<H2><A HREF="#toc6" NAME="sect6">See Also</A></H2>
<P><A HREF="pthread_create.html"><B>pthread_create</B>(3)</A> ,
<A HREF="pthread_join.html"><B>pthread_join</B>(3)</A> ,
@@ -83,4 +86,4 @@ returned.
</P>
</UL>
</BODY>
-</HTML>
+</HTML> \ No newline at end of file