From 534c9c78f3e1ea966e0301afe836cf70c7c61e3b Mon Sep 17 00:00:00 2001 From: jilles Date: Wed, 1 Jun 2016 21:58:13 +0000 Subject: thr_*(2): Add xrefs to what libthr implements using each syscall. Add text to thr_exit(2) and thr_new(2) discouraging their use in applications since calling these in a process with libthr loaded will confuse libthr and is likely to cause hangs or crashes. The thr_kill2(2) call is not used by libthr and may be useful in special applications. The other calls can be used in applications but it should not be necessary. --- lib/libc/sys/thr_exit.2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libc/sys/thr_exit.2') diff --git a/lib/libc/sys/thr_exit.2 b/lib/libc/sys/thr_exit.2 index 70a07f8..781b07f 100644 --- a/lib/libc/sys/thr_exit.2 +++ b/lib/libc/sys/thr_exit.2 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 5, 2016 +.Dd June 1, 2016 .Dt THR_EXIT 2 .Os .Sh NAME @@ -41,6 +41,13 @@ .Ft void .Fn thr_exit "long *state" .Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should call +.Xr pthread_exit 3 +instead. +.Ef +.Pp The .Fn thr_exit system call terminates the current kernel-scheduled thread. @@ -70,7 +77,8 @@ last one in the process. .Xr thr_new 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 +.Xr _umtx_op 2 , +.Xr pthread_exit 3 .Sh STANDARDS The .Fn thr_exit -- cgit v1.1