Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread -fix initial stacksize rounding
details: https://anonhg.NetBSD.org/src/rev/18c73504061c
branches: trunk
changeset: 777917:18c73504061c
user: drochner <drochner%NetBSD.org@localhost>
date: Fri Mar 09 12:06:44 2012 +0000
description:
-fix initial stacksize rounding
-minor indentation fix
diffstat:
lib/libpthread/pthread.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 26e504dea023 -r 18c73504061c lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c Fri Mar 09 10:42:12 2012 +0000
+++ b/lib/libpthread/pthread.c Fri Mar 09 12:06:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.128 2012/03/08 16:40:45 joerg Exp $ */
+/* $NetBSD: pthread.c,v 1.129 2012/03/09 12:06:44 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.128 2012/03/08 16:40:45 joerg Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.129 2012/03/09 12:06:44 drochner Exp $");
#define __EXPOSE_STACK 1
@@ -340,7 +340,7 @@
mapped_stack = true;
}
newthread->pt_stack.ss_size = pthread__stacksize - pthread__pagesize;
- newthread->pt_stack.ss_sp = stackbase;
+ newthread->pt_stack.ss_sp = stackbase;
#ifdef __MACHINE_STACK_GROWS_UP
redzone = (char *)stackbase + newthread->pt_stack.ss_size;
#else
@@ -1260,7 +1260,7 @@
if (pthread__stacksize == 0)
pthread__stacksize = pthread__main.pt_stack.ss_size;
pthread__stacksize += pthread__pagesize - 1;
- pthread__stacksize &= ~pthread__pagesize;
+ pthread__stacksize &= ~(pthread__pagesize - 1);
if (pthread__stacksize < 4 * pthread__pagesize)
errx(1, "Stacksize limit is too low, minimum %zd kbyte.",
4 * pthread__pagesize / 1024);
Home |
Main Index |
Thread Index |
Old Index