kernel - Add shutdown method for vm.swapcache
[dragonfly.git] / sys / sys / eventhandler.h
index d1f5028..147c6fc 100644 (file)
@@ -158,17 +158,32 @@ extern struct eventhandler_list   *eventhandler_find_list(char *name);
 #define        EVENTHANDLER_PRI_ANY    10000
 #define        EVENTHANDLER_PRI_LAST   20000
 
+/* BPF attach/detach events */
+struct ifnet;
+typedef void (*bpf_track_fn)(void *, struct ifnet *, int /* dlt */,
+    int /* 1 =>'s attach */);
+EVENTHANDLER_DECLARE(bpf_track, bpf_track_fn);
+
+struct image_params;
+struct proc;
+
 /* Shutdown events */
 typedef void (*shutdown_fn) (void *, int);
 
 #define        SHUTDOWN_PRI_FIRST      EVENTHANDLER_PRI_FIRST
+#define        SHUTDOWN_PRI_SECOND     (EVENTHANDLER_PRI_FIRST + 1)
+#define        SHUTDOWN_PRI_THIRD      (EVENTHANDLER_PRI_FIRST + 2)
 #define        SHUTDOWN_PRI_DEFAULT    EVENTHANDLER_PRI_ANY
 #define        SHUTDOWN_PRI_DRIVER     (EVENTHANDLER_PRI_ANY + 5000)
 #define        SHUTDOWN_PRI_LAST       EVENTHANDLER_PRI_LAST
+typedef void (*execlist_fn)(void *, struct image_params *);
+typedef void (*exit_list_fn)(void *, struct proc *);
 
 EVENTHANDLER_DECLARE(shutdown_pre_sync, shutdown_fn);  /* before fs sync */
 EVENTHANDLER_DECLARE(shutdown_post_sync, shutdown_fn); /* after fs sync */
 EVENTHANDLER_DECLARE(shutdown_final, shutdown_fn);
+EVENTHANDLER_DECLARE(process_exec, execlist_fn);
+EVENTHANDLER_DECLARE(process_exit, exit_list_fn);
 
 #endif /* _KERNEL */
 #endif /* SYS_EVENTHANDLER_H */