]> git.saurik.com Git - apple/system_cmds.git/blob - lskq.tproj/common.h
system_cmds-790.tar.gz
[apple/system_cmds.git] / lskq.tproj / common.h
1 /*
2 * Copyright (c) 2015 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 #ifndef _LSKQ_COMMON_H_
25 #define _LSKQ_COMMON_H_
26
27 /*
28 * This file must be kept in sync with xnu headers
29 */
30
31 /*
32 * bsd/sys/event.h
33 */
34 #define KN_ACTIVE 0x0001
35 #define KN_QUEUED 0x0002
36 #define KN_DISABLED 0x0004
37 #define KN_DROPPING 0x0008
38 #define KN_USEWAIT 0x0010
39 #define KN_ATTACHING 0x0020
40 #define KN_STAYACTIVE 0x0040
41 #define KN_DEFERDELETE 0x0080
42 #define KN_ATTACHED 0x0100
43 #define KN_DISPATCH 0x0200
44 #define KN_UDATA_SPECIFIC 0x0400
45 #define KN_SUPPRESSED 0x0800
46 #define KN_STOLENDROP 0x1000
47 #define KN_REQVANISH 0x2000
48 #define KN_VANISHED 0x4000
49
50
51 /*
52 * bsd/sys/eventvar.h
53 */
54 #define KQ_SEL 0x01
55 #define KQ_SLEEP 0x02
56 #define KQ_KEV32 0x08
57 #define KQ_KEV64 0x10
58 #define KQ_KEV_QOS 0x20
59 #define KQ_WORKQ 0x40
60 #define KQ_WORKLOOP 0x80
61
62 /*
63 * bsd/sys/signal.h
64 */
65 static const char *
66 sig_strs[] = {
67 [0] = "<UNKN>",
68 [1] = "SIGHUP",
69 [2] = "SIGINT",
70 [3] = "SIGQUIT",
71 [4] = "SIGILL",
72 [5] = "SIGTRAP",
73 [6] = "SIGABRT",
74 [7] = "SIGEMT",
75 [8] = "SIGFPE",
76 [9] = "SIGKILL",
77 [10] = "SIGBUS",
78 [11] = "SIGSEGV",
79 [12] = "SIGSYS",
80 [13] = "SIGPIPE",
81 [14] = "SIGALRM",
82 [15] = "SIGTERM",
83 [16] = "SIGURG",
84 [17] = "SIGSTOP",
85 [18] = "SIGTSTP",
86 [19] = "SIGCONT",
87 [20] = "SIGCHLD",
88 [21] = "SIGTTIN",
89 [22] = "SIGTTOU",
90 [23] = "SIGIO",
91 [24] = "SIGXCPU",
92 [25] = "SIGXFSZ",
93 [26] = "SIGVTALRM",
94 [27] = "SIGPROF",
95 [28] = "SIGWINCH",
96 [29] = "SIGINFO",
97 [30] = "SIGUSR1",
98 [31] = "SIGUSR2"
99 };
100
101 /*
102 * bsd/sys/event.h: EVFILT_*
103 */
104 static const char *
105 filt_strs[] = {
106 NULL,
107 "READ",
108 "WRITE",
109 "AIO",
110 "VNODE",
111 "PROC",
112 "SIGNAL",
113 "TIMER",
114 "MACHPORT",
115 "FS",
116 "USER",
117 "<inval>",
118 "VM",
119 "SOCK",
120 "MEMSTATUS",
121 "EXCEPT",
122 "CHANNEL",
123 "WORKLOOP",
124 };
125
126 /*
127 * bsd/sys/proc_info.h: PROX_FDTYPE_*
128 */
129 static const char *
130 fdtype_strs[] = {
131 "ATALK",
132 "VNODE",
133 "SOCKET",
134 "PSHM",
135 "PSEM",
136 "KQUEUE",
137 "PIPE",
138 "FSEVENTS",
139 "ATALK",
140 "POLICY",
141 "CHANNEL",
142 "NEXUS",
143 };
144
145 #endif /* _LSKQ_COMMON_H_ */