]> git.saurik.com Git - apple/libc.git/blobdiff - pthreads/pthread_join.3
Libc-498.tar.gz
[apple/libc.git] / pthreads / pthread_join.3
index ef9ddf821ac538660bdf74ca6accaaf66eb11405..6402393e382e7c143378b9687e791bdf8e7a37d1 100644 (file)
 .Sh SYNOPSIS
 .Fd #include <pthread.h>
 .Ft int
 .Sh SYNOPSIS
 .Fd #include <pthread.h>
 .Ft int
-.Fn pthread_join "pthread_t thread" "void **value_ptr"
+.Fo pthread_join
+.Fa "pthread_t thread"
+.Fa "void **value_ptr"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn pthread_join
 function suspends execution of the calling thread until the target
 .Fa thread
 .Sh DESCRIPTION
 The
 .Fn pthread_join
 function suspends execution of the calling thread until the target
 .Fa thread
-terminates unless the target
+terminates, unless the target
 .Fa thread
 has already terminated.
 .Pp
 .Fa thread
 has already terminated.
 .Pp
@@ -62,22 +65,26 @@ When a
 returns successfully, the target thread has been terminated.
 The results
 of multiple simultaneous calls to
 returns successfully, the target thread has been terminated.
 The results
 of multiple simultaneous calls to
-.Fn pthread_join
-specifying the same target thread are undefined.
+.Fn pthread_join ,
+specifying the same target thread, are undefined.
 If the thread calling
 .Fn pthread_join
 If the thread calling
 .Fn pthread_join
-is cancelled, then the target thread is not detached.
+is cancelled, the target thread is not detached.
 .Pp
 .Sh RETURN VALUES
 If successful,  the
 .Fn pthread_join
 function will return zero.
 .Pp
 .Sh RETURN VALUES
 If successful,  the
 .Fn pthread_join
 function will return zero.
-Otherwise an error number will be returned to
+Otherwise, an error number will be returned to
 indicate the error.
 .Sh ERRORS
 .Fn pthread_join
 will fail if:
 .Bl -tag -width Er
 indicate the error.
 .Sh ERRORS
 .Fn pthread_join
 will fail if:
 .Bl -tag -width Er
+.It Bq Er EDEADLK
+A deadlock was detected or the value of
+.Fa thread
+specifies the calling thread.
 .It Bq Er EINVAL
 The implementation has detected that the value specified by
 .Fa thread
 .It Bq Er EINVAL
 The implementation has detected that the value specified by
 .Fa thread
@@ -86,10 +93,6 @@ does not refer to a joinable thread.
 No thread could be found corresponding to that specified by the given
 thread ID,
 .Fa thread .
 No thread could be found corresponding to that specified by the given
 thread ID,
 .Fa thread .
-.It Bq Er EDEADLK
-A deadlock was detected or the value of
-.Fa thread
-specifies the calling thread.
 .El
 .Sh SEE ALSO
 .Xr wait 2 ,
 .El
 .Sh SEE ALSO
 .Xr wait 2 ,