From 05c1a8d501dbdbfbf2224db0bbe83cb2ac4031c6 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 17 May 2005 16:35:31 +0000 Subject: '' --- manual/pthread_detach.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'manual') 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 @@ PTHREAD_DETACH(3) manual page - + @@ -23,11 +23,12 @@

Description

pthread_detach puts the thread th in the detached -state. This guarantees that the memory resources consumed by th -will be freed immediately when th terminates. However, this +state. This guarantees that the resources consumed by th will +be freed immediately when th terminates. However, this prevents other threads from synchronizing on the termination of th -using pthread_join. -

+using pthread_join. If, when pthread_detach is called, +th has already terminated, all of th's remaining +resources will be freed.

A thread can be created initially in the detached state, using the detachstate attribute to pthread_create(3) . In contrast, pthread_detach applies to threads created in @@ -37,8 +38,9 @@ later.

After pthread_detach completes, subsequent attempts to perform pthread_join on th will fail. If another thread is already joining the thread th at the time pthread_detach -is called, pthread_detach does nothing and leaves th in -the joinable state. +is called, th will be detached and pthread_join +will eventually return when th terminates but may not return +with th's correct return code.

Return Value

On success, 0 is returned. On error, a non-zero error code is @@ -58,6 +60,7 @@ returned. Author

Xavier Leroy <Xavier.Leroy@inria.fr>

+

Modified by Ross Johnson for use with Pthreads-w32.

See Also

pthread_create(3) , pthread_join(3) , @@ -83,4 +86,4 @@ returned.

- + \ No newline at end of file -- cgit v1.2.3