Warn about consequences of suspending threads in arbitrary state of

execution.

While there, fix minor nits in markup.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2016-05-05 10:22:19 +00:00
parent 321e2a0090
commit 9c671dbd0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299115
3 changed files with 18 additions and 4 deletions

View File

@ -57,7 +57,7 @@ function will fail if:
The value specified by the
.Fa tid
argument is invalid.
.It Bq ESRC
.It Bq Er ESRC
No thread could be found corresponding to the thread ID specified by the
.Fa tid
argument.

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 13, 2003
.Dd May 5, 2016
.Dt PTHREAD_SUSPEND_ALL_NP 3
.Os
.Sh NAME
@ -44,6 +44,13 @@ The only exception is the current thread,
the thread that called the
.Fn pthread_suspend_all_np
function.
.Pp
It is not safe for the caller of the
.Fn pthread_suspend_all_np
function to use any non-async signal safe functions, besides
.Xr pthread_resume_all_np 3 ,
until threads are resumed, unless measures are taken to ensure
that all threads are suspended at safe points.
.Sh SEE ALSO
.Xr pthread_resume_all_np 3 ,
.Xr pthread_resume_np 3 ,

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 13, 2003
.Dd May 5, 2016
.Dt PTHREAD_SUSPEND_NP 3
.Os
.Sh NAME
@ -40,6 +40,13 @@
The
.Fn pthread_suspend_np
function, called on an active thread, causes it to suspend.
.Pp
It is not safe for the caller of the
.Fn pthread_suspend_np
function to use any non-async signal safe functions, except
.Xr pthread_resume_np 3 ,
until suspended thread is resumed, unless measures are taken to ensure
that the thread is suspended at a safe point.
.Sh RETURN VALUES
If successful,
.Fn pthread_suspend_np
@ -56,7 +63,7 @@ An attempt was made to suspend the current thread.
The value specified by the
.Fa tid
argument is invalid.
.It Bq ESRC
.It Bq Er ESRC
No thread could be found corresponding to the thread ID specified by the
.Fa tid
argument.