Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/dev Make stacksize of newly spawn lwp's bi...



details:   https://anonhg.NetBSD.org/src/rev/c8df158c560c
branches:  trunk
changeset: 769571:c8df158c560c
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Sep 14 18:30:13 2011 +0000

description:
Make stacksize of newly spawn lwp's bigger than one page. Actually use the
variable stack_size now

diffstat:

 sys/arch/usermode/dev/cpu.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r e3ae975a43e7 -r c8df158c560c sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Wed Sep 14 18:28:36 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Wed Sep 14 18:30:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.45 2011/09/10 10:37:06 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.46 2011/09/14 18:30:13 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.45 2011/09/10 10:37:06 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.46 2011/09/14 18:30:13 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -318,9 +318,9 @@
        /* copy the PCB and its switchframes from parent */
        memcpy(pcb2, pcb1, sizeof(struct pcb));
 
-       stacksize = PAGE_SIZE;
-       stack_ucp          = malloc(PAGE_SIZE, M_TEMP, M_NOWAIT);
-       stack_syscall_ucp  = malloc(PAGE_SIZE, M_TEMP, M_NOWAIT);
+       stacksize = 4*PAGE_SIZE;
+       stack_ucp          = malloc(stacksize, M_TEMP, M_NOWAIT);
+       stack_syscall_ucp  = malloc(stacksize, M_TEMP, M_NOWAIT);
        pcb2->pcb_needfree = true;
 
        if (thunk_getcontext(&pcb2->pcb_ucp))



Home | Main Index | Thread Index | Old Index