diff options
author | 2017-02-12 04:55:08 +0000 | |
---|---|---|
committer | 2017-02-12 04:55:08 +0000 | |
commit | 79a514fcbea783e80e5f8763d0f8d6ad9a05557f (patch) | |
tree | f5fbd8606926da7e5c642eaf00c91812ef78973e /sys/kern/kern_sched.c | |
parent | The videocore portion of the raspberry pi which boots the arm cores and (diff) | |
download | wireguard-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_sched.c')
-rw-r--r-- | sys/kern/kern_sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index dd3d4ef0dc5..50c86ec3b01 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.44 2017/01/21 05:42:03 guenther Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.45 2017/02/12 04:55:08 guenther Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -108,7 +108,7 @@ sched_kthreads_create(void *v) static int num; if (fork1(&proc0, FORK_SHAREVM|FORK_SHAREFILES|FORK_NOZOMBIE| - FORK_SYSTEM|FORK_SIGHAND|FORK_IDLE, NULL, 0, sched_idle, ci, NULL, + FORK_SYSTEM|FORK_SIGHAND|FORK_IDLE, sched_idle, ci, NULL, &spc->spc_idleproc)) panic("fork idle"); |