summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-06 18:41:11 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-06 18:41:11 +0000
commit89ae7820c1a454d61cd281925d300bf324cfb4a3 (patch)
tree322119c116dc2ae1a396e832aac803b47d2df136 /sys/arch/vax
parent1c0a1a534d87ced0c6089cb972b59491152bbdfa (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/arch/vax')
-rw-r--r--sys/arch/vax/vax/vm_machdep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c
index f3bd540ec52..2c19e441160 100644
--- a/sys/arch/vax/vax/vm_machdep.c
+++ b/sys/arch/vax/vax/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.25 2001/11/06 02:49:23 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.26 2001/11/06 18:41:10 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */
/*
@@ -91,8 +91,7 @@ pagemove(from, to, size)
* directly to user level with an apparent return value of 0 from
* fork(), while the parent process returns normally.
*
- * p1 is the process being forked; if p1 == &proc0, we are creating
- * a kernel thread, and the return path will later be changed in cpu_set_kpc.
+ * p1 is the process being forked;
*
* If an alternate user-level stack is requested (with non-zero values
* in both the stack and stacksize args), set up the user stack pointer
@@ -107,10 +106,12 @@ pagemove(from, to, size)
* forking.
*/
void
-cpu_fork(p1, p2, stack, stacksize)
+cpu_fork(p1, p2, stack, stacksize, func, arg)
struct proc *p1, *p2;
void *stack;
size_t stacksize;
+ void (*func)(void *);
+ void *arg;
{
struct pte *pt;
struct pcb *nyproc;