summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kthread.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/kern_kthread.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/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 80ee61dd77d..c2f95169367 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_kthread.c,v 1.40 2017/01/21 05:42:03 guenther Exp $ */
+/* $OpenBSD: kern_kthread.c,v 1.41 2017/02/12 04:55:08 guenther Exp $ */
/* $NetBSD: kern_kthread.c,v 1.3 1998/12/22 21:21:36 kleink Exp $ */
/*-
@@ -66,7 +66,7 @@ kthread_create(void (*func)(void *), void *arg,
* parent to wait for.
*/
error = fork1(&proc0, FORK_SHAREVM|FORK_SHAREFILES|FORK_NOZOMBIE|
- FORK_SYSTEM|FORK_SIGHAND, NULL, 0, func, arg, NULL, &p);
+ FORK_SYSTEM|FORK_SIGHAND, func, arg, NULL, &p);
if (error)
return (error);