]>
git.saurik.com Git - apple/system_cmds.git/blob - lskq.tproj/common.h
2 * Copyright (c) 2015 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _LSKQ_COMMON_H_
25 #define _LSKQ_COMMON_H_
30 * This file must be kept in sync with xnu headers
36 __options_decl(kn_status_t
, uint16_t /* 12 bits really */, {
37 KN_ACTIVE
= 0x001, /* event has been triggered */
38 KN_QUEUED
= 0x002, /* event is on queue */
39 KN_DISABLED
= 0x004, /* event is disabled */
40 KN_DROPPING
= 0x008, /* knote is being dropped */
41 KN_LOCKED
= 0x010, /* knote is locked (kq_knlocks) */
42 KN_POSTING
= 0x020, /* f_event() in flight */
43 KN_STAYACTIVE
= 0x040, /* force event to stay active */
44 KN_DEFERDELETE
= 0x080, /* defer delete until re-enabled */
45 KN_MERGE_QOS
= 0x100, /* f_event() / f_* ran concurrently and overrides must merge */
46 KN_REQVANISH
= 0x200, /* requested EV_VANISH */
47 KN_VANISHED
= 0x400, /* has vanished */
48 KN_SUPPRESSED
= 0x800, /* event is suppressed during delivery */
54 __options_decl(kq_state_t
, uint16_t, {
55 KQ_SEL
= 0x0001, /* select was recorded for kq */
56 KQ_SLEEP
= 0x0002, /* thread is waiting for events */
57 KQ_PROCWAIT
= 0x0004, /* thread waiting for processing */
58 KQ_KEV32
= 0x0008, /* kq is used with 32-bit events */
59 KQ_KEV64
= 0x0010, /* kq is used with 64-bit events */
60 KQ_KEV_QOS
= 0x0020, /* kq events carry QoS info */
61 KQ_WORKQ
= 0x0040, /* KQ is bound to process workq */
62 KQ_WORKLOOP
= 0x0080, /* KQ is part of a workloop */
63 KQ_PROCESSING
= 0x0100, /* KQ is being processed */
64 KQ_DRAIN
= 0x0200, /* kq is draining */
65 KQ_WAKEUP
= 0x0400, /* kq awakened while processing */
66 KQ_DYNAMIC
= 0x0800, /* kqueue is dynamically managed */
67 KQ_R2K_ARMED
= 0x1000, /* ast notification armed */
68 KQ_HAS_TURNSTILE
= 0x2000, /* this kqueue has a turnstile */
72 * bsd/pthread/workqueue_internal.h
74 __enum_decl(workq_tr_state_t
, uint8_t, {
75 WORKQ_TR_STATE_IDLE
= 0, /* request isn't in flight */
76 WORKQ_TR_STATE_NEW
= 1, /* request is being initiated */
77 WORKQ_TR_STATE_QUEUED
= 2, /* request is being queued */
78 WORKQ_TR_STATE_CANCELED
= 3, /* request is canceled */
79 WORKQ_TR_STATE_BINDING
= 4, /* request is preposted for bind */
80 WORKQ_TR_STATE_BOUND
= 5, /* request is bound to a thread */
124 * bsd/sys/event.h: EVFILT_*
149 * bsd/sys/proc_info.h: PROX_FDTYPE_*
167 #endif /* _LSKQ_COMMON_H_ */