aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-05-20 00:38:23 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-05-20 00:38:23 +0000
commite2e050c8ef733138fc6a9e514e4b856fefbc3ff1 (patch)
treef2ba0e6ef3f572211c35dcb8f9aef4f132a08d96 /sys/sys/proc.h
parent2ad7ed6e4a84448234e9aaef3c9fa884848f7387 (diff)
downloadsrc-e2e050c8ef733138fc6a9e514e4b856fefbc3ff1.tar.gz
src-e2e050c8ef733138fc6a9e514e4b856fefbc3ff1.zip
Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
Notes
Notes: svn path=/head/; revision=347984
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 4c37b9fb3ff0..a257de430ba7 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -42,6 +42,9 @@
#include <sys/callout.h> /* For struct callout. */
#include <sys/event.h> /* For struct klist. */
+#ifdef _KERNEL
+#include <sys/_eventhandler.h>
+#endif
#include <sys/condvar.h>
#ifndef _KERNEL
#include <sys/filedesc.h>
@@ -1186,6 +1189,18 @@ void proc_id_set(int type, pid_t id);
void proc_id_set_cond(int type, pid_t id);
void proc_id_clear(int type, pid_t id);
+EVENTHANDLER_LIST_DECLARE(process_ctor);
+EVENTHANDLER_LIST_DECLARE(process_dtor);
+EVENTHANDLER_LIST_DECLARE(process_init);
+EVENTHANDLER_LIST_DECLARE(process_fini);
+EVENTHANDLER_LIST_DECLARE(process_exit);
+EVENTHANDLER_LIST_DECLARE(process_fork);
+EVENTHANDLER_LIST_DECLARE(process_exec);
+
+EVENTHANDLER_LIST_DECLARE(thread_ctor);
+EVENTHANDLER_LIST_DECLARE(thread_dtor);
+EVENTHANDLER_LIST_DECLARE(thread_init);
+
#endif /* _KERNEL */
#endif /* !_SYS_PROC_H_ */