summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 8b86f8983e9e5..50737539e83d8 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -487,6 +487,15 @@ proc0_init(void *dummy __unused)
vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser,
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.