+ *
+ * Please note that EVFILT_PROC and EVFILT_SIGNAL share the same knote list
+ * that hangs off the proc structure. They also both play games with the hint
+ * passed to KNOTE(). If NOTE_SIGNAL is passed as a hint, then the lower bits
+ * of the hint contain the signal. IF NOTE_FORK is passed, then the lower bits
+ * contain the PID of the child (but the pid does not get passed through in
+ * the actual kevent).
+ */
+enum {
+ eNoteReapDeprecated __deprecated_enum_msg("This kqueue(2) EVFILT_PROC flag is deprecated") = 0x10000000
+};
+
+#define NOTE_EXIT 0x80000000 /* process exited */
+#define NOTE_FORK 0x40000000 /* process forked */
+#define NOTE_EXEC 0x20000000 /* process exec'd */
+#define NOTE_REAP ((unsigned int)eNoteReapDeprecated /* 0x10000000 */) /* process reaped */
+#define NOTE_SIGNAL 0x08000000 /* shared with EVFILT_SIGNAL */
+#define NOTE_EXITSTATUS 0x04000000 /* exit status to be returned, valid for child process only */
+#define NOTE_EXIT_DETAIL 0x02000000 /* provide details on reasons for exit */
+
+#define NOTE_PDATAMASK 0x000fffff /* mask for signal & exit status */
+#define NOTE_PCTRLMASK (~NOTE_PDATAMASK)
+
+/*
+ * If NOTE_EXITSTATUS is present, provide additional info about exiting process.
+ */
+enum {
+ eNoteExitReparentedDeprecated __deprecated_enum_msg("This kqueue(2) EVFILT_PROC flag is no longer sent") = 0x00080000
+};
+#define NOTE_EXIT_REPARENTED ((unsigned int)eNoteExitReparentedDeprecated) /* exited while reparented */
+
+/*
+ * If NOTE_EXIT_DETAIL is present, these bits indicate specific reasons for exiting.
+ */
+#define NOTE_EXIT_DETAIL_MASK 0x00070000
+#define NOTE_EXIT_DECRYPTFAIL 0x00010000
+#define NOTE_EXIT_MEMORY 0x00020000
+#define NOTE_EXIT_CSERROR 0x00040000
+
+#ifdef PRIVATE
+
+/*
+ * If NOTE_EXIT_MEMORY is present, these bits indicate specific jetsam condition.
+ */
+#define NOTE_EXIT_MEMORY_DETAIL_MASK 0xfe000000
+#define NOTE_EXIT_MEMORY_VMPAGESHORTAGE 0x80000000 /* jetsam condition: lowest jetsam priority proc killed due to vm page shortage */
+#define NOTE_EXIT_MEMORY_VMTHRASHING 0x40000000 /* jetsam condition: lowest jetsam priority proc killed due to vm thrashing */
+#define NOTE_EXIT_MEMORY_HIWAT 0x20000000 /* jetsam condition: process reached its high water mark */
+#define NOTE_EXIT_MEMORY_PID 0x10000000 /* jetsam condition: special pid kill requested */
+#define NOTE_EXIT_MEMORY_IDLE 0x08000000 /* jetsam condition: idle process cleaned up */
+#define NOTE_EXIT_MEMORY_VNODE 0X04000000 /* jetsam condition: virtual node kill */
+#define NOTE_EXIT_MEMORY_FCTHRASHING 0x02000000 /* jetsam condition: lowest jetsam priority proc killed due to filecache thrashing */
+
+#endif
+
+/*
+ * data/hint fflags for EVFILT_VM, shared with userspace.
+ */
+#define NOTE_VM_PRESSURE 0x80000000 /* will react on memory pressure */
+#define NOTE_VM_PRESSURE_TERMINATE 0x40000000 /* will quit on memory pressure, possibly after cleaning up dirty state */
+#define NOTE_VM_PRESSURE_SUDDEN_TERMINATE 0x20000000 /* will quit immediately on memory pressure */
+#define NOTE_VM_ERROR 0x10000000 /* there was an error */
+
+#ifdef PRIVATE
+
+/*
+ * data/hint fflags for EVFILT_MEMORYSTATUS, shared with userspace.