diff options
| author | 2001-11-06 18:41:09 +0000 | |
|---|---|---|
| committer | 2001-11-06 18:41:09 +0000 | |
| commit | 1359e66cac17161a0340876a35cefdf01fe6f0a9 (patch) | |
| tree | beef7a915dd004044e12159969cc63fedac994f0 /sys/kern/kern_kthread.c | |
| parent | Since the header of the file map is Start End, (diff) | |
| download | wireguard-openbsd-1359e66cac17161a0340876a35cefdf01fe6f0a9.tar.xz wireguard-openbsd-1359e66cac17161a0340876a35cefdf01fe6f0a9.zip | |
Let fork1, uvm_fork, and cpu_fork take a function/argument pair as argument,
instead of doing fork1, cpu_set_kpc. This lets us retire cpu_set_kpc and
avoid a multiprocessor race.
This commit breaks vax because it doesn't look like any other arch, someone
working on vax might want to look at this and try to adapt the code to be
more like the rest of the world.
Idea and uvm parts from NetBSD.
Diffstat (limited to 'sys/kern/kern_kthread.c')
| -rw-r--r-- | sys/kern/kern_kthread.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index ac09d23fdc8..bc392d5ca51 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_kthread.c,v 1.14 2001/08/08 02:37:40 millert Exp $ */ +/* $OpenBSD: kern_kthread.c,v 1.15 2001/11/06 18:41:10 art Exp $ */ /* $NetBSD: kern_kthread.c,v 1.3 1998/12/22 21:21:36 kleink Exp $ */ /*- @@ -84,15 +84,12 @@ kthread_create(func, arg, newpp, fmt, va_alist) * parent to wait for. */ error = fork1(&proc0, 0, - FORK_SHAREVM|FORK_NOZOMBIE|FORK_SIGHAND, NULL, 0, rv); + FORK_SHAREVM|FORK_NOZOMBIE|FORK_SIGHAND, NULL, 0, func, arg, rv); if (error) return (error); p2 = pfind(rv[0]); - /* Arrange for it to start at the specified function. */ - cpu_set_kpc(p2, func, arg); - /* * Mark it as a system process and not a candidate for * swapping. |
