Module Name:    src
Committed By:   drochner
Date:           Thu Mar 22 20:01:19 UTC 2012

Modified Files:
        src/lib/libpthread: pthread.c

Log Message:
don't reuse a dynamically allocated stack if a fixed one is requested


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/lib/libpthread/pthread.c

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.132 src/lib/libpthread/pthread.c:1.133
--- src/lib/libpthread/pthread.c:1.132	Mon Mar 12 20:16:52 2012
+++ src/lib/libpthread/pthread.c	Thu Mar 22 20:01:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.132 2012/03/12 20:16:52 joerg Exp $	*/
+/*	$NetBSD: pthread.c,v 1.133 2012/03/22 20:01:18 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread.c,v 1.132 2012/03/12 20:16:52 joerg Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.133 2012/03/22 20:01:18 drochner Exp $");
 
 #define	__EXPOSE_STACK	1
 
@@ -333,7 +333,8 @@ pthread__getstack(pthread_t newthread, c
 		stacksize = pthread__stacksize;
 
 	if (newthread->pt_stack_allocated) {
-		if (newthread->pt_stack.ss_size == stacksize)
+		if (stackbase == NULL &&
+		    newthread->pt_stack.ss_size == stacksize)
 			return 0;
 		stackbase2 = newthread->pt_stack.ss_sp;
 #ifndef __MACHINE_STACK_GROWS_UP

Reply via email to