|
NAMEthr_suspend —
suspend the calling thread
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <sys/thr.h>
int
DESCRIPTIONThis function is intended for implementing threading. Normal
applications should use
pthread_cond_timedwait(3)
together with
pthread_cond_broadcast(3)
for typical safe suspension with cooperation of the thread being suspended, or
pthread_suspend_np(3)
and
pthread_resume_np(3)
in some specific situations, instead.
The If the timeout argument is
If a wake from
thr_wake(2)
was delivered before the If a thread previously called
thr_wake(2)
with its own thread identifier, which resulted in setting the internal
kernel flag to immediately abort interruptible sleeps with an
RETURN VALUESThethr_suspend () function returns the value 0 if
successful; otherwise the value -1 is returned and the global variable
errno is set to indicate the error.
ERRORSThethr_suspend () operation returns the following
errors:
SEE ALSOps(1), thr_wake(2), pthread_resume_np(3), pthread_suspend_np(3)STANDARDSThethr_suspend () system call is non-standard.
HISTORYThethr_suspend () system call first appeared in
FreeBSD 5.2.
Visit the GSP FreeBSD Man Page Interface. |