diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-06 18:41:11 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-06 18:41:11 +0000 |
commit | 89ae7820c1a454d61cd281925d300bf324cfb4a3 (patch) | |
tree | 322119c116dc2ae1a396e832aac803b47d2df136 /sys/compat | |
parent | 1c0a1a534d87ced0c6089cb972b59491152bbdfa (diff) |
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/compat')
-rw-r--r-- | sys/compat/linux/linux_sched.c | 4 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_misc.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_sched.c b/sys/compat/linux/linux_sched.c index 7b0e050a011..4d47196b37f 100644 --- a/sys/compat/linux/linux_sched.c +++ b/sys/compat/linux/linux_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_sched.c,v 1.2 2001/05/15 09:34:44 jasoni Exp $ */ +/* $OpenBSD: linux_sched.c,v 1.3 2001/11/06 18:41:10 art Exp $ */ /* $NetBSD: linux_sched.c,v 1.6 2000/05/28 05:49:05 thorpej Exp $ */ /*- @@ -96,7 +96,7 @@ linux_sys_clone(p, v, retval) * or down. So, we pass a stack size of 0, so that the code * that makes this adjustment is a noop. */ - return (fork1(p, sig, flags, SCARG(uap, stack), 0, retval)); + return (fork1(p, sig, flags, SCARG(uap, stack), 0, NULL, NULL, retval)); } int diff --git a/sys/compat/netbsd/netbsd_misc.c b/sys/compat/netbsd/netbsd_misc.c index d6c22b6aa68..3489e366a8e 100644 --- a/sys/compat/netbsd/netbsd_misc.c +++ b/sys/compat/netbsd/netbsd_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netbsd_misc.c,v 1.11 2001/04/03 20:37:16 niklas Exp $ */ +/* $OpenBSD: netbsd_misc.c,v 1.12 2001/11/06 18:41:10 art Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -60,7 +60,8 @@ netbsd_sys___vfork14(p, v, retval) void *v; register_t *retval; { - return (fork1(p, SIGCHLD, FORK_PPWAIT|FORK_SHAREVM, NULL, 0, retval)); + return (fork1(p, SIGCHLD, FORK_PPWAIT|FORK_SHAREVM, NULL, 0, NULL, + NULL, retval)); } /* XXX syncs whole file */ |