td_thr_dbsuspend(3T)
NAME
td_thr_dbsuspend, td_thr_dbresume − suspend and resume threads in libthread_db
SYNOPSIS
cc [ flag ... ] file ... /lib/libthread_db.so.1 [ library ... ]
#include <proc_service.h>
#include <thread_db.h>
td_err_e td_thr_dbsuspend(const td_thrhandle_t ∗th_p);
td_err_e td_thr_dbresume(const td_thrhandle_t ∗th_p);
DESCRIPTION
These operations suspend and resume the thread identified by th_p. A thread that has been suspended with td_thr_dbsuspend() is said to be in the "dbsuspended" state. A thread whose "dbsuspended" flag is set will not execute. If an unbound thread enters the "dbsuspended" state and is currently assigned to a lightweight process ( LWP), then the LWP becomes available for assignment to a different thread.
A thread’s "dbsuspended" state is independent of the suspension state controlled by calls to thr_suspend(3T) and thr_continue(3T) from within the target process. Calling thr_continue(3T) within the target process on a thread that has been suspended during a call to td_thr_dbsuspend() will not cause that thread to resume execution; only a call to td_thr_dbresume() will do that.
RETURN VALUES
TD_OK The call completed successfully.
TD_BADTH An invalid thread handle was passed in.
TD_DBERR A call to one of the imported interface routines failed.
TD_NOCAPAB
The "agent thread" in the target process has not completed initialization, so this operation cannot be performed. The operation can be performed after the target process has been allowed to make some forward progress. See also libthread_db(3T).
TD_ERR A libthread_db internal error occurred.
ATTRIBUTES
See attributes(5) for description of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| MT-Level | Safe |
SEE ALSO
libthread_db(3T), thr_continue(3T), thr_suspend(3T), libthread_db(4), attributes(5)
SunOS 5.6 — Last change: 6 Jan 1997