summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-11-18 13:56:51 +0000
committerrrs <rrs@FreeBSD.org>2007-11-18 13:56:51 +0000
commit9dbec8e7dff5d2722f0ec81fca3a4d632eaadd19 (patch)
tree1d74f56fcd6bf633948f11aeb60da0adbc7d33fc /sys/kern/init_main.c
parent86052f1e7e8e5e32f8b635478b7ad3d91efd1737 (diff)
downloadFreeBSD-src-9dbec8e7dff5d2722f0ec81fca3a4d632eaadd19.zip
FreeBSD-src-9dbec8e7dff5d2722f0ec81fca3a4d632eaadd19.tar.gz
- Add in missing event handler invokes for initial proc and thread.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 93abd69..b536215 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -371,7 +371,7 @@ proc0_init(void *dummy __unused)
GIANT_REQUIRED;
p = &proc0;
td = &thread0;
-
+
/*
* Initialize magic number.
*/
@@ -488,6 +488,16 @@ proc0_init(void *dummy __unused)
p->p_sysent->sv_maxuser);
vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0);
+ /*-
+ * call the init and ctor for the new thread and proc
+ * we wait to do this until all other structures
+ * are fairly sane.
+ */
+ EVENTHANDLER_INVOKE(process_init, p);
+ EVENTHANDLER_INVOKE(thread_init, td);
+ EVENTHANDLER_INVOKE(process_ctor, p);
+ EVENTHANDLER_INVOKE(thread_ctor, td);
+
/*
* Charge root for one process.
*/
OpenPOWER on IntegriCloud