]> git.saurik.com Git - apple/system_cmds.git/blob - lskq.tproj/common.h
system_cmds-735.20.1.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 0x01
35 #define KN_QUEUED 0x02
36 #define KN_DISABLED 0x04
37 #define KN_DROPPING 0x08
38 #define KN_USEWAIT 0x10
39 #define KN_ATTACHING 0x20
40 #define KN_STAYQUEUED 0x40
41 #define KN_DEFERDROP 0x80
42 #define KN_TOUCH 0x100
43
44
45 /*
46 * bsd/sys/eventvar.h
47 */
48 #define KQ_SEL 0x01
49 #define KQ_SLEEP 0x02
50 #define KQ_KEV32 0x08
51 #define KQ_KEV64 0x10
52 #define KQ_KEV_QOS 0x20
53
54 /*
55 * bsd/sys/signal.h
56 */
57 static const char *
58 sig_strs[] = {
59 [0] = "<UNKN>",
60 [1] = "SIGHUP",
61 [2] = "SIGINT",
62 [3] = "SIGQUIT",
63 [4] = "SIGILL",
64 [5] = "SIGTRAP",
65 [6] = "SIGABRT",
66 [7] = "SIGEMT",
67 [8] = "SIGFPE",
68 [9] = "SIGKILL",
69 [10] = "SIGBUS",
70 [11] = "SIGSEGV",
71 [12] = "SIGSYS",
72 [13] = "SIGPIPE",
73 [14] = "SIGALRM",
74 [15] = "SIGTERM",
75 [16] = "SIGURG",
76 [17] = "SIGSTOP",
77 [18] = "SIGTSTP",
78 [19] = "SIGCONT",
79 [20] = "SIGCHLD",
80 [21] = "SIGTTIN",
81 [22] = "SIGTTOU",
82 [23] = "SIGIO",
83 [24] = "SIGXCPU",
84 [25] = "SIGXFSZ",
85 [26] = "SIGVTALRM",
86 [27] = "SIGPROF",
87 [28] = "SIGWINCH",
88 [29] = "SIGINFO",
89 [30] = "SIGUSR1",
90 [31] = "SIGUSR2"
91 };
92
93 /*
94 * bsd/sys/event.h: EVFILT_*
95 */
96 static const char *
97 filt_strs[] = {
98 NULL,
99 "READ",
100 "WRITE",
101 "AIO",
102 "VNODE",
103 "PROC",
104 "SIGNAL",
105 "TIMER",
106 "MACHPORT",
107 "FS",
108 "USER",
109 "<inval>",
110 "VM",
111 "SOCK",
112 "MEMSTATUS",
113 };
114
115 /*
116 * bsd/sys/proc_info.h: PROX_FDTYPE_*
117 */
118 static const char *
119 fdtype_strs[] = {
120 "ATALK",
121 "VNODE",
122 "SOCKET",
123 "PSHM",
124 "PSEM",
125 "KQUEUE",
126 "PIPE",
127 "FSEVENTS",
128 };
129
130 #endif /* _LSKQ_COMMON_H_ */