Date: Sun, 25 Jan 2026 00:24:50 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d1ac644ccc43 - stable/15 - Document pthread_tryjoin_np(3) Message-ID: <697562d2.3efb6.6e1561bc@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d1ac644ccc43148525371d099ebbcb0fe4a471d0 commit d1ac644ccc43148525371d099ebbcb0fe4a471d0 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-01-18 12:53:12 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-01-25 00:23:35 +0000 Document pthread_tryjoin_np(3) (cherry picked from commit 7f026a58691db1763203ab8c7c8f34f738bfd9d5) --- share/man/man3/Makefile | 3 ++- share/man/man3/pthread_join.3 | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 8e4aadc460a6..cae79b8f8182 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -540,6 +540,7 @@ PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \ PTHREAD_MLINKS+=pthread_testcancel.3 pthread_setcancelstate.3 \ pthread_testcancel.3 pthread_setcanceltype.3 PTHREAD_MLINKS+=pthread_join.3 pthread_peekjoin_np.3 \ - pthread_join.3 pthread_timedjoin_np.3 + pthread_join.3 pthread_timedjoin_np.3 \ + pthread_join.3 pthread_tryjoin_np.3 .include <bsd.prog.mk> diff --git a/share/man/man3/pthread_join.3 b/share/man/man3/pthread_join.3 index 716b171e1295..671ce7bb445c 100644 --- a/share/man/man3/pthread_join.3 +++ b/share/man/man3/pthread_join.3 @@ -35,6 +35,7 @@ .Nm pthread_join , .Nm pthread_peekjoin_np , .Nm pthread_timedjoin_np +.Nm pthread_tryjoin_np .Nd inspect thread termination state .Sh LIBRARY .Lb libpthread @@ -54,6 +55,8 @@ .Fa "void **value_ptr" .Fa "const struct timespec *abstime" .Fc +.Ft int +.Fn pthread_tryjoin_np "pthread_t thread" "void **value_ptr" .Sh DESCRIPTION The .Fn pthread_join @@ -104,6 +107,13 @@ the .Fn pthread_join family of functions again. .Pp +The +.Fn pthread_tryjoin_np +function joins the thread if it is already terminated, same as +.Fn pthread_join . +If the thread has not yet terminated, the function returns +.Er EBUSY . +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES @@ -147,7 +157,9 @@ waited for thread exit. .Pp The .Fn pthread_peekjoin_np -function will also fail if: +and +.Fn pthread_tryjoin_np +functions will also fail if: .Bl -tag -width Er .It Bq Er EBUSY The specified thread has not yet exited. @@ -168,7 +180,15 @@ function is a .Fx extension which first appeared in .Fx 6.1 . -Another extension, the +The .Fn pthread_peekjoin_np -function, first appearead in +function is a +.Fx +extension which first appearead in .Fx 13.0 . +The +.Fn pthread_tryjoin_np +function is a +.Fx +extension which first appearead in +.Fx 16.0 .home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?697562d2.3efb6.6e1561bc>
