]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/IOTimeStamp.h
xnu-792.tar.gz
[apple/xnu.git] / iokit / IOKit / IOTimeStamp.h
1 /*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 #ifndef IOKIT_IOTIMESTAMP_H
23 #define IOKIT_IOTIMESTAMP_H
24
25 #include <sys/kdebug.h>
26
27 static inline void
28 IOTimeStampStartConstant(unsigned int csc,
29 unsigned int a = 0, unsigned int b = 0,
30 unsigned int c = 0, unsigned int d = 0)
31 {
32 KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_START, a, b, c, d, 0);
33 }
34
35 static inline void
36 IOTimeStampEndConstant(unsigned int csc,
37 unsigned int a = 0, unsigned int b = 0,
38 unsigned int c = 0, unsigned int d = 0)
39 {
40 KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_END, a, b, c, d, 0);
41 }
42
43 static inline void
44 IOTimeStampConstant(unsigned int csc,
45 unsigned int a = 0, unsigned int b = 0,
46 unsigned int c = 0, unsigned int d = 0)
47 {
48 KERNEL_DEBUG_CONSTANT(csc | DBG_FUNC_NONE, a, b, c, d, 0);
49 }
50
51 #if KDEBUG
52
53 static inline void
54 IOTimeStampStart(unsigned int csc,
55 unsigned int a = 0, unsigned int b = 0,
56 unsigned int c = 0, unsigned int d = 0)
57 {
58 KERNEL_DEBUG(csc | DBG_FUNC_START, a, b, c, d, 0);
59 }
60
61 static inline void
62 IOTimeStampEnd(unsigned int csc,
63 unsigned int a = 0, unsigned int b = 0,
64 unsigned int c = 0, unsigned int d = 0)
65 {
66 KERNEL_DEBUG(csc | DBG_FUNC_END, a, b, c, d, 0);
67 }
68
69 static inline void
70 IOTimeStamp(unsigned int csc,
71 unsigned int a = 0, unsigned int b = 0,
72 unsigned int c = 0, unsigned int d = 0)
73 {
74 KERNEL_DEBUG(csc | DBG_FUNC_NONE, a, b, c, d, 0);
75 }
76
77 #endif /* KDEBUG */
78
79 #define IODBG_SCSI(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSCSI, code))
80 #define IODBG_DISK(code) (KDBG_CODE(DBG_IOKIT, DBG_IODISK, code))
81 #define IODBG_NETWORK(code) (KDBG_CODE(DBG_IOKIT, DBG_IONETWORK, code))
82 #define IODBG_KEYBOARD(code) (KDBG_CODE(DBG_IOKIT, DBG_IOKEYBOARD, code))
83 #define IODBG_POINTING(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPOINTING, code))
84 #define IODBG_AUDIO(code) (KDBG_CODE(DBG_IOKIT, DBG_IOAUDIO, code))
85 #define IODBG_FLOPPY(code) (KDBG_CODE(DBG_IOKIT, DBG_IOFLOPPY, code))
86 #define IODBG_SERIAL(code) (KDBG_CODE(DBG_IOKIT, DBG_IOSERIAL, code))
87 #define IODBG_TTY(code) (KDBG_CODE(DBG_IOKIT, DBG_IOTTY, code))
88
89 /* IOKit infrastructure subclasses */
90 #define IODBG_WORKLOOP(code) (KDBG_CODE(DBG_IOKIT, DBG_IOWORKLOOP, code))
91 #define IODBG_INTES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOINTES, code))
92 #define IODBG_TIMES(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCLKES, code))
93 #define IODBG_CMDQ(code) (KDBG_CODE(DBG_IOKIT, DBG_IOCMDQ, code))
94 #define IODBG_MCURS(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMCURS, code))
95 #define IODBG_MDESC(code) (KDBG_CODE(DBG_IOKIT, DBG_IOMDESC, code))
96 #define IODBG_POWER(code) (KDBG_CODE(DBG_IOKIT, DBG_IOPOWER, code))
97
98 /* IOKit specific codes - within each subclass */
99
100 /* DBG_IOKIT/DBG_IOSCSI codes */
101
102 /* DBG_IOKIT/DBG_IODISK codes */
103
104 /* DBG_IOKIT/DBG_IONETWORK codes */
105
106 /* DBG_IOKIT/DBG_IOKEYBOARD codes */
107
108 /* DBG_IOKIT/DBG_IOPOINTING codes */
109
110 /* DBG_IOKIT/DBG_IOAUDIO codes */
111
112 /* DBG_IOKIT/DBG_IOFLOPPY codes */
113
114 /* DBG_IOKIT/DBG_IOSERIAL codes */
115
116 /* DBG_IOKIT/DBG_IOTTY codes */
117
118 /* DBG_IOKIT/DBG_IOWORKLOOP codes */
119 #define IOWL_CLIENT 1 /* 0x050a0004 */
120 #define IOWL_WORK 2 /* 0x050a0008 */
121
122 /* DBG_IOKIT/DBG_IOINTES codes */
123 #define IOINTES_CLIENT 1 /* 0x050b0004 */
124 #define IOINTES_LAT 2 /* 0x050b0008 */
125 #define IOINTES_SEMA 3 /* 0x050b000c */
126 #define IOINTES_INTCTXT 4 /* 0x050b0010 */
127 #define IOINTES_INTFLTR 5 /* 0x050b0014 */
128 #define IOINTES_ACTION 6 /* 0x050b0018 */
129 #define IOINTES_FILTER 7 /* 0x050b001c */
130
131 /* DBG_IOKIT/DBG_IOTIMES codes */
132 #define IOTIMES_CLIENT 1 /* 0x050c0004 */
133 #define IOTIMES_LAT 2 /* 0x050c0008 */
134 #define IOTIMES_SEMA 3 /* 0x050c000c */
135 #define IOTIMES_ACTION 4 /* 0x050c0010 */
136
137 /* DBG_IOKIT/DBG_IOCMDQ codes */
138 #define IOCMDQ_CLIENT 1 /* 0x050d0004 */
139 #define IOCMDQ_LAT 2 /* 0x050d0008 */
140 #define IOCMDQ_SEMA 3 /* 0x050d000c */
141 #define IOCMDQ_PSEMA 4 /* 0x050d0010 */
142 #define IOCMDQ_PLOCK 5 /* 0x050d0014 */
143 #define IOCMDQ_ACTION 6 /* 0x050d0018 */
144
145 /* DBG_IOKIT/DBG_IOMCURS codes */
146
147 /* DBG_IOKIT/DBG_IOMDESC codes */
148
149 /* DBG_IOKIT/DBG_IOPOWER codes */
150 // See IOKit/pwr_mgt/IOPMlog.h for the power management codes
151
152 #endif /* ! IOKIT_IOTIMESTAMP_H */