manpages.info - online man pages   

SunOS man pages : td_thr_dbresume (3)

Threads Library Functions                  td_thr_dbsuspend(3THR)

NAME

td_thr_dbsuspend, td_thr_dbresume - suspend and resume threads in libthread_db

SYNOPSIS

cc [ flag ... ] file ... -lthread_db [ 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(3THR) and thr_continue(3THR) from within the target process. Calling thr_continue(3THR) 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 exe- cution; 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 com- pleted 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(3THR) TD_ERR A libthread_db internal error occurred. SunOS 5.8 Last change: 20 Oct 1998 1 Threads Library Functions td_thr_dbsuspend(3THR)

ATTRIBUTES

See attributes(5) for description of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | MT-Level | Safe | |_____________________________|_____________________________|

SEE ALSO

libthread_db(3THR), thr_continue(3THR), thr_suspend(3THR), libthread_db(3LIB), attributes(5) SunOS 5.8 Last change: 20 Oct 1998 2