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