Module Name:    src
Committed By:   reinoud
Date:           Wed Sep 14 18:30:13 UTC 2011

Modified Files:
        src/sys/arch/usermode/dev: cpu.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/usermode/dev/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.45 src/sys/arch/usermode/dev/cpu.c:1.46
--- src/sys/arch/usermode/dev/cpu.c:1.45	Sat Sep 10 10:37:06 2011
+++ src/sys/arch/usermode/dev/cpu.c	Wed Sep 14 18:30:13 2011
@@ -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 <jmcne...@invisible.ca>
@@ -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))

Reply via email to