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