Threads Debugging Library Functions tdtanew(3CDB)
NAME
tdtanew, tdtadelete, tdtagetph - allocate and deallo-
cate process handles for libcdb
SYNOPSIS
cc [ flag... ] file... -lcdb [ library... ]
#include
#include
tderre tdtanew(const struct psprochandle *php, tdthragentt **tapp);
tderre tdtadelete(const tdthragentt *tap);
tderre tdtagetph(const tdthragentt *tap, struct psprochandle **phpp);
DESCRIPTION
The tdtanew() function registers a target process with
libcdb(3LIB) and allocates an internal process handle of
type tdthragentt for this target process. Subsequent
calls to libcdb can use this handle to refer to this target
process.
There are actually two process handles, an internal process
handle assigned by libcdb and an external process handle
assigned by the libcdb client. There is a one-to-one
correspondence between the two handles. When the client
calls a libcdb function, it uses the internal process han-
dle. When libcdb calls one of the client-provided routines
listed in procservice(3PROC), it uses the external process
handle.
The ph argument is the external process handle that libcdb
should use to identify this target process to the control-
ling process when it calls routines in the imported inter-
face.
If this call is successful, the value of the newly allocated
tdthragentt handle is returned in *tapp. The
tdtadelete() function deregisters a target process with
libcdb, which deallocates its internal process handle and
frees any other resources libcdb has acquired with respect
to the target process. The tap argument specifies the tar-
get process to be deregistered.
SunOS 5.11 Last change: 20 Oct 1998 1
Threads Debugging Library Functions tdtanew(3CDB)
The tdtagetph() function returns in *phpp the external
process handle that corresponds to the internal process han-
dle tap. This is useful for checking internal consistency.
RETURN VALUES
TDOK The call completed successfully.
TDBADPH A NUL external process handle was passed
to tdtanew().
TDER The tapp argument is NUL or an internal
error occurred.
TDBER A call to one of the imported interface
routines failed.
TDMALOC Memory allocation failure.
TDNOLIBTHREAD The target process does not appear to be
multithreaded.
ATRIBUTES
See attributes(5) for description of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level Safe
SEE ALSO
libcdb(3LIB), procservice(3PROC), attributes(5)
SunOS 5.11 Last change: 20 Oct 1998 2
|