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