From 4666ac50272776168d29d2c4142de771daa30381 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 6 Jan 1999 23:05:42 +0000 Subject: 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 --- sys/amd64/amd64/vm_machdep.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'sys/amd64/amd64/vm_machdep.c') 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; -- cgit v1.1