summaryrefslogtreecommitdiffstats
path: root/share/man/man3/pthread_join.3
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-01-23 13:08:47 +0000
committerkib <kib@FreeBSD.org>2010-01-23 13:08:47 +0000
commit22188bf2d03496348cf79fe3478e52c6b7655095 (patch)
tree9a67ce884a175792269ee2aa23b2ecd1e2364384 /share/man/man3/pthread_join.3
parent233af5fd9317397ad5b62c55c60c9713ea1bed86 (diff)
downloadFreeBSD-src-22188bf2d03496348cf79fe3478e52c6b7655095.zip
FreeBSD-src-22188bf2d03496348cf79fe3478e52c6b7655095.tar.gz
Document pthread_timedjoin_np.
Note implementation-defined EOPNOTSUPP error [1]. PR: threads/143115 [1] MFC after: 3 days
Diffstat (limited to 'share/man/man3/pthread_join.3')
-rw-r--r--share/man/man3/pthread_join.342
1 files changed, 38 insertions, 4 deletions
diff --git a/share/man/man3/pthread_join.3 b/share/man/man3/pthread_join.3
index 1aa5932..b01069a 100644
--- a/share/man/man3/pthread_join.3
+++ b/share/man/man3/pthread_join.3
@@ -30,11 +30,12 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 4, 1996
+.Dd January 23, 2010
.Dt PTHREAD_JOIN 3
.Os
.Sh NAME
-.Nm pthread_join
+.Nm pthread_join ,
+.Nm pthread_timedjoin_np
.Nd wait for thread termination
.Sh LIBRARY
.Lb libpthread
@@ -42,6 +43,8 @@
.In pthread.h
.Ft int
.Fn pthread_join "pthread_t thread" "void **value_ptr"
+.Ft int
+.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime"
.Sh DESCRIPTION
The
.Fn pthread_join
@@ -70,18 +73,30 @@ If the thread calling
.Fn pthread_join
is cancelled, then the target thread is not detached.
.Pp
+The
+.Fn pthread_timedjoin_np
+function is equivalent to the
+.Fn pthread_join
+function except it will return
+.Er ETIMEDOUT
+if target thread does not exit before specified absolute time passes.
+.Pp
A thread that has exited but remains unjoined counts against
[_POSIX_THREAD_THREADS_MAX].
.Sh RETURN VALUES
If successful, the
.Fn pthread_join
-function will return zero.
+and
+.Fn pthread_timedjoin_np
+functions will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
The
.Fn pthread_join
-function will fail if:
+and
+.Fn pthread_timedjoin_np
+functions will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The implementation has detected that the value specified by
@@ -95,6 +110,19 @@ thread ID,
A deadlock was detected or the value of
.Fa thread
specifies the calling thread.
+.It Bq Er EOPNOTSUPP
+The implementation detected that another caller is already waiting on
+.Fa thread .
+.El
+.Pp
+Additionally, the
+.Fn pthread_join
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er ETIMEDOUT
+The specified absolute time passed while
+.Fn pthread_timedjoin_np
+waited for thread exit.
.El
.Sh SEE ALSO
.Xr wait 2 ,
@@ -104,3 +132,9 @@ The
.Fn pthread_join
function conforms to
.St -p1003.1-96 .
+The
+.Fn pthread_timedjoin_np
+is
+.Fx
+extension, first appeared in
+.Fx 6.1 .
OpenPOWER on IntegriCloud