Main index | Section 2 | Options |
#include <sys/thr.h>
The thr_suspend() system call puts the calling thread in a suspended state, where it is not eligible for CPU time. This state is exited by another thread calling thr_wake(2), when the time interval specified by timeout has elapsed, or by the delivery of a signal to the suspended thread.
If the timeout argument is NULL, the suspended state can be only terminated by explicit thr_wake() or signal.
If a wake from thr_wake(2) was delivered before the thr_suspend call, the thread is not put into a suspended state. Instead, the call returns immediately without an error.
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 EINTR error ( see thr_wake(2) ), the flag is cleared. As with thr_wake(2) called from another thread, the next thr_suspend call does not result in suspension.
[EFAULT] | |
The memory pointed to by the timeout argument is not valid. | |
[ETIMEDOUT] | |
The specified timeout expired. | |
[ETIMEDOUT] | |
The timeout argument specified a zero time interval. | |
[EINTR] | |
The sleep was interrupted by a signal. | |
THR_SUSPEND (2) | September 23, 2016 |
Main index | Section 2 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Hang in there, people suffering from natural disasters and deadly diseases - we're putting ribbons on our cars as fast as we can | ” |
— Artur Bagyants |