5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25
26 /*
27 * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 #ifndef _MON_H
32 #define _MON_H
33
34 #pragma ident "%Z%%M% %I% %E% SMI"
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /*
41 * Inclusion of <sys/types.h> will break SVID namespace, hence only
42 * the size_t type is defined in this header.
43 */
44 #if !defined(_SIZE_T) || __cplusplus >= 199711L
45 #define _SIZE_T
46 #if defined(_LP64) || defined(_I32LPx)
47 typedef unsigned long size_t; /* size of something in bytes */
48 #else
49 typedef unsigned int size_t; /* (historical version) */
50 #endif
51 #endif /* _SIZE_T */
52
53 struct hdr {
54 char *lpc;
55 char *hpc;
58
59 struct cnt {
60 char *fnpc;
61 long mcnt;
62 };
63
64 typedef unsigned short WORD;
65
66 #define MON_OUT "mon.out"
67 #define MPROGS0 (150 * sizeof (WORD)) /* 300 for pdp11, 600 for 32-bits */
68 #define MSCALE0 4
69
70 #ifndef NULL
71 #if defined(_LP64)
72 #define NULL 0L
73 #else
74 #define NULL 0
75 #endif
76 #endif
77
78 #if defined(__STDC__)
79 extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t);
80 #else
81 extern void monitor();
82 #endif
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif /* _MON_H */
|
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25 /*
26 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 *
28 * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31
32 #ifndef _MON_H
33 #define _MON_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * Inclusion of <sys/types.h> will break SVID namespace, hence only
41 * the size_t type is defined in this header.
42 */
43 #if !defined(_SIZE_T) || __cplusplus >= 199711L
44 #define _SIZE_T
45 #if defined(_LP64) || defined(_I32LPx)
46 typedef unsigned long size_t; /* size of something in bytes */
47 #else
48 typedef unsigned int size_t; /* (historical version) */
49 #endif
50 #endif /* _SIZE_T */
51
52 struct hdr {
53 char *lpc;
54 char *hpc;
57
58 struct cnt {
59 char *fnpc;
60 long mcnt;
61 };
62
63 typedef unsigned short WORD;
64
65 #define MON_OUT "mon.out"
66 #define MPROGS0 (150 * sizeof (WORD)) /* 300 for pdp11, 600 for 32-bits */
67 #define MSCALE0 4
68
69 #ifndef NULL
70 #if defined(_LP64)
71 #define NULL 0L
72 #else
73 #define NULL 0
74 #endif
75 #endif
76
77 extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t);
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif /* _MON_H */
|