xref: /onnv-gate/usr/src/lib/libdtrace/common/dt_program.h (revision 265:a968e4ece133)
1*265Smws /*
2*265Smws  * CDDL HEADER START
3*265Smws  *
4*265Smws  * The contents of this file are subject to the terms of the
5*265Smws  * Common Development and Distribution License, Version 1.0 only
6*265Smws  * (the "License").  You may not use this file except in compliance
7*265Smws  * with the License.
8*265Smws  *
9*265Smws  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*265Smws  * or http://www.opensolaris.org/os/licensing.
11*265Smws  * See the License for the specific language governing permissions
12*265Smws  * and limitations under the License.
13*265Smws  *
14*265Smws  * When distributing Covered Code, include this CDDL HEADER in each
15*265Smws  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*265Smws  * If applicable, add the following below this CDDL HEADER, with the
17*265Smws  * fields enclosed by brackets "[]" replaced with your own identifying
18*265Smws  * information: Portions Copyright [yyyy] [name of copyright owner]
19*265Smws  *
20*265Smws  * CDDL HEADER END
21*265Smws  */
22*265Smws /*
23*265Smws  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*265Smws  * Use is subject to license terms.
25*265Smws  */
26*265Smws 
27*265Smws #ifndef	_DT_PROGRAM_H
28*265Smws #define	_DT_PROGRAM_H
29*265Smws 
30*265Smws #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*265Smws 
32*265Smws #ifdef	__cplusplus
33*265Smws extern "C" {
34*265Smws #endif
35*265Smws 
36*265Smws #include <dtrace.h>
37*265Smws #include <dt_list.h>
38*265Smws 
39*265Smws typedef struct dt_stmt {
40*265Smws 	dt_list_t ds_list;	/* list forward/back pointers */
41*265Smws 	dtrace_stmtdesc_t *ds_desc; /* pointer to statement description */
42*265Smws } dt_stmt_t;
43*265Smws 
44*265Smws struct dtrace_prog {
45*265Smws 	dt_list_t dp_list;	/* list forward/back pointers */
46*265Smws 	dt_list_t dp_stmts;	/* linked list of dt_stmt_t's */
47*265Smws 	ulong_t **dp_xrefs;	/* array of translator reference bitmaps */
48*265Smws 	uint_t dp_xrefslen;	/* length of dp_xrefs array */
49*265Smws };
50*265Smws 
51*265Smws extern dtrace_prog_t *dt_program_create(dtrace_hdl_t *);
52*265Smws extern void dt_program_destroy(dtrace_hdl_t *, dtrace_prog_t *);
53*265Smws 
54*265Smws extern dtrace_ecbdesc_t *dt_ecbdesc_create(dtrace_hdl_t *,
55*265Smws     const dtrace_probedesc_t *);
56*265Smws extern void dt_ecbdesc_release(dtrace_hdl_t *, dtrace_ecbdesc_t *);
57*265Smws 
58*265Smws #ifdef	__cplusplus
59*265Smws }
60*265Smws #endif
61*265Smws 
62*265Smws #endif	/* _DT_PROGRAM_H */
63