'\" te .\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved .TH td_ta_map_id2thr 3C_DB "20 Oct 1998" "SunOS 5.11" "Threads Debugging Library Functions" .SH NAME td_ta_map_id2thr, td_ta_map_lwp2thr \- convert a thread ID or LWP ID to a thread handle .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lc_db [ \fIlibrary\fR... ] #include #include \fB\fR\fBtd_ta_map_id2thr\fR(\fBconst td_thragent_t *\fR\fIta_p\fR, \fBthread_t tid,td_thrhandle_t *\fR\fIth_p\fR); .fi .LP .nf \fB\fR\fBtd_ta_map_lwp2thr\fR(\fBconst td_thragent_t *\fR\fIta_p\fR, \fBlwpid_t lwpid,td_thrhandle_t *\fR\fIth_p\fR); .fi .SH DESCRIPTION .sp .LP The \fBtd_ta_map_id2thr()\fR function produces the \fBtd_thrhandle_t\fR thread handle that corresponds to a particular thread ID, as returned by \fBthr_create\fR(3C) or \fBthr_self\fR(3C). The thread handle is returned in *\fIth_p\fR. .sp .LP The \fBtd_ta_map_lwp2thr()\fR function produces the \fBtd_thrhandle_t\fR thread handle for the thread that is currently executing on the light weight process ( \fBLWP\fR) and has an ID of \fBlwpid\fR. .SH RETURN VALUES .sp .ne 2 .mk .na \fB\fBTD_OK\fR\fR .ad .RS 12n .rt The call completed successfully. .RE .sp .ne 2 .mk .na \fB\fBTD_BADTA\fR\fR .ad .RS 12n .rt An invalid internal process handle was passed in. .RE .sp .ne 2 .mk .na \fB\fBTD_BADPH\fR\fR .ad .RS 12n .rt There is a \fINULL\fR external process handle associated with this internal process handle. .RE .sp .ne 2 .mk .na \fB\fBTD_DBERR\fR\fR .ad .RS 12n .rt A call to one of the imported interface routines failed. .RE .sp .ne 2 .mk .na \fB\fBTD_NOTHR\fR\fR .ad .RS 12n .rt Either there is no thread with the given thread ID ( \fBtd_ta_map_id2thr\fR) or no thread is currently executing on the given \fBLWP\fR ( \fBtd_ta_map_lwp2thr\fR). .RE .sp .ne 2 .mk .na \fB\fBTD_ERR\fR\fR .ad .RS 12n .rt The call did not complete successfully. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for description of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibc_db\fR(3LIB), \fBthr_create\fR(3C), \fBthr_self\fR(3C), \fBattributes\fR(5)