Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread don't reuse a dynamically allocated stack if ...



details:   https://anonhg.NetBSD.org/src/rev/3bd00e3d6acb
branches:  trunk
changeset: 778343:3bd00e3d6acb
user:      drochner <drochner%NetBSD.org@localhost>
date:      Thu Mar 22 20:01:18 2012 +0000

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

diffstat:

 lib/libpthread/pthread.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 02f6a80d7d42 -r 3bd00e3d6acb lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c  Thu Mar 22 18:20:46 2012 +0000
+++ b/lib/libpthread/pthread.c  Thu Mar 22 20:01:18 2012 +0000
@@ -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 @@
                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



Home | Main Index | Thread Index | Old Index