diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-17 10:32:20 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-17 10:32:20 +0000 |
commit | d86a6c16672c6fd6de49e6c04095bbe180db8edf (patch) | |
tree | d4538cad037bcb5ad1572a3d144628a50e829859 /sys/uvm/uvm_glue.c | |
parent | 63b7a98cc57e3a3fbf4e70bcd27a4eb65721c359 (diff) |
New cpu_fork API to take a stack in which you point the child's stackpointer
to, at the bottom or the top, depending on your architecture's stack growth
direction. This is in preparation for Linux' clone(2) emulation.
port maintainers, please check that I did the work right.
Diffstat (limited to 'sys/uvm/uvm_glue.c')
-rw-r--r-- | sys/uvm/uvm_glue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index dd27027eb32..dfbf67de7f6 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_glue.c,v 1.2 1999/02/26 05:32:06 art Exp $ */ +/* $OpenBSD: uvm_glue.c,v 1.3 1999/08/17 10:32:19 niklas Exp $ */ /* $NetBSD: uvm_glue.c,v 1.15 1998/10/19 22:21:19 tron Exp $ */ /* @@ -266,9 +266,11 @@ uvm_vsunlock(p, addr, len) * than just hang */ void -uvm_fork(p1, p2, shared) +uvm_fork(p1, p2, shared, stack, stacksize) struct proc *p1, *p2; boolean_t shared; + void *stack; + size_t stacksize; { struct user *up = p2->p_addr; int rv; @@ -304,12 +306,12 @@ uvm_fork(p1, p2, shared) ((caddr_t)&up->u_stats.pstat_endcopy - (caddr_t)&up->u_stats.pstat_startcopy)); -/* + /* * cpu_fork will copy and update the kernel stack and pcb, and make * the child ready to run. The child will exit directly to user * mode on its first time slice, and will not return here. */ - cpu_fork(p1, p2); + cpu_fork(p1, p2, stack, stacksize); } /* |