Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Threads Library Functionstd_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 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(3THR)
TD_ERR
A libthread_db internal error occurred.

ATTRIBUTES

 

See attributes(5) for description of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelSafe

SEE ALSO

 

libthread_db(3THR), thr_continue(3THR), thr_suspend(3THR), libthread_db(3LIB), attributes(5)


SunOS 5.9Go To TopLast Changed 20 Oct 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.