summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-02-12 04:55:08 +0000
committerguenther <guenther@openbsd.org>2017-02-12 04:55:08 +0000
commit79a514fcbea783e80e5f8763d0f8d6ad9a05557f (patch)
treef5fbd8606926da7e5c642eaf00c91812ef78973e /sys/kern/init_main.c
parentThe videocore portion of the raspberry pi which boots the arm cores and (diff)
downloadwireguard-openbsd-79a514fcbea783e80e5f8763d0f8d6ad9a05557f.tar.xz
wireguard-openbsd-79a514fcbea783e80e5f8763d0f8d6ad9a05557f.zip
Split up fork1():
- FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter. luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index e21a8306854..faa74aa4244 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.265 2017/01/21 05:42:03 guenther Exp $ */
+/* $OpenBSD: init_main.c,v 1.266 2017/02/12 04:55:08 guenther Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -437,8 +437,7 @@ main(void *framep)
{
struct proc *initproc;
- if (fork1(p, FORK_FORK, NULL, 0, start_init, NULL, NULL,
- &initproc))
+ if (fork1(p, FORK_FORK, start_init, NULL, NULL, &initproc))
panic("fork init");
initprocess = initproc->p_p;
}