thr_suspend(3T)
NAME
thr_suspend, thr_continue − suspend or continue thread execution
SYNOPSIS
#include <thread.h>
int thr_suspend(thread_t target_thread);
int thr_continue(thread_t target_thread);
MT-LEVEL
MT-Safe
DESCRIPTION
thr_suspend() immediately suspends the execution of the thread specified by target_thread. On successful return from thr_suspend(), the suspended thread is no longer executing. Once a thread is suspended, subsequent calls to thr_suspend() have no effect.
thr_continue() resumes the execution of a suspended thread. Once a suspended thread is continued, subsequent calls to thr_continue() have no effect.
A suspended thread will not be awakened by a signal. The signal stays pending until the execution of the thread is resumed by thr_continue().
RETURN VALUES
thr_suspend() and thr_continue() return 0 when successful. A non-zero value indicates an error.
ERRORS
If any of the following conditions are detected, thr_suspend() or thr_continue() fails and returns the corresponding value:
ESRCH target_thread cannot be found in the current process.
ECANCELED target_thread was not suspended because a subsequent thr_continue() occurred before the suspend completed.
EINVAL When thr_continue() returns EINVAL, target_thread has died and thr_join () must be called on it to reclaim its resources.
SEE ALSO
NOTES
The are no POSIX counterparts to the Solaris threads suspend and continue functionality described on this man page.
SunOS 5.5.1 — Last change: 25 Oct 1995