1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
'\" te
.\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH TD_TA_MAP_ID2THR 3C_DB "Oct 20, 1998"
.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 <proc_service.h>
#include <thread_db.h>
\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
.na
\fB\fBTD_OK\fR\fR
.ad
.RS 12n
The call completed successfully.
.RE
.sp
.ne 2
.na
\fB\fBTD_BADTA\fR\fR
.ad
.RS 12n
An invalid internal process handle was passed in.
.RE
.sp
.ne 2
.na
\fB\fBTD_BADPH\fR\fR
.ad
.RS 12n
There is a \fINULL\fR external process handle associated with this internal
process handle.
.RE
.sp
.ne 2
.na
\fB\fBTD_DBERR\fR\fR
.ad
.RS 12n
A call to one of the imported interface routines failed.
.RE
.sp
.ne 2
.na
\fB\fBTD_NOTHR\fR\fR
.ad
.RS 12n
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
.na
\fB\fBTD_ERR\fR\fR
.ad
.RS 12n
The call did not complete successfully.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for description of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
MT-Level Safe
.TE
.SH SEE ALSO
.sp
.LP
.BR thr_create (3C),
.BR thr_self (3C),
.BR libc_db (3LIB),
.BR attributes (7)
|