|
NAMEthr_wake —
wake up the suspended 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.
Passing the thread identifier of the calling thread (see
thr_self(2))
to If id is not equal to the current thread
identifier, the specified thread is woken up if suspended by the
thr_suspend(2)
system call. If the thread is not suspended at the time of the
RETURN VALUESThethr_wake () 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_wake () operation returns these errors:
SEE ALSOps(1), thr_self(2), thr_suspend(2), pthread_cancel(3), pthread_resume_np(3), pthread_suspend_np(3)STANDARDSThethr_suspend () system call is non-standard and is
used by 1:1 Threading Library (libthr, -lthr) to
implement IEEE Std 1003.1-2001
(“POSIX.1”)
pthread(3)
functionality.
HISTORYThethr_suspend () system call first appeared in
FreeBSD 5.2.
Visit the GSP FreeBSD Man Page Interface. |