diff options
author | julian <julian@FreeBSD.org> | 1999-01-06 23:05:42 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-01-06 23:05:42 +0000 |
commit | 4666ac50272776168d29d2c4142de771daa30381 (patch) | |
tree | 132bbd3c7ed8de9adf36dcd6258013de903e583a /sys/amd64/amd64/vm_machdep.c | |
parent | 6b0a11c013bb11bbed19aea0a563ebb393a899ef (diff) | |
download | FreeBSD-src-4666ac50272776168d29d2c4142de771daa30381.zip FreeBSD-src-4666ac50272776168d29d2c4142de771daa30381.tar.gz |
Add (but don't activate) code for a special VM option to make
downward growing stacks more general.
Add (but don't activate) code to use the new stack facility
when running threads, (specifically the linux threads support).
This allows people to use both linux compiled linuxthreads, and also the
native FreeBSD linux-threads port.
The code is conditional on VM_STACK. Not using this will
produce the old heavily tested system.
Submitted by: Richard Seaman <dick@tar.com>
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 761008e..d0bdc93 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.113 1998/10/31 17:21:30 peter Exp $ + * $Id: vm_machdep.c,v 1.114 1998/12/16 15:21:51 bde Exp $ */ #include "npx.h" @@ -507,6 +507,7 @@ cpu_reset_real() while(1); } +#ifndef VM_STACK /* * Grow the user stack to allow for 'sp'. This version grows the stack in * chunks of SGROWSIZ. @@ -559,6 +560,22 @@ grow(p, sp) return (1); } +#else +int +grow_stack(p, sp) + struct proc *p; + u_int sp; +{ + int rv; + + rv = vm_map_growstack (p, sp); + if (rv != KERN_SUCCESS) + return (0); + + return (1); +} +#endif + static int cnt_prezero; |