summaryrefslogtreecommitdiff
path: root/lib/libpthread/pthread.c
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2012-03-09 12:06:44 +0000
committerdrochner <drochner@NetBSD.org>2012-03-09 12:06:44 +0000
commit5c4d19be1bee6ba565393e8a610a3cc92f0b8982 (patch)
treee8db945c98844bf69392d58f811b800320894467 /lib/libpthread/pthread.c
parent70872b5e49fb041d6e18052c2a22fdbbdb1f20ba (diff)
-fix initial stacksize rounding
-minor indentation fix
Diffstat (limited to 'lib/libpthread/pthread.c')
-rw-r--r--lib/libpthread/pthread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpthread/pthread.c b/lib/libpthread/pthread.c
index 9c3dc39ff3b..91979705523 100644
--- a/lib/libpthread/pthread.c
+++ b/lib/libpthread/pthread.c
@@ -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 @@ pthread__newstack(pthread_t newthread, const pthread_attr_t *attr)
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 @@ pthread__initmain(pthread_t *newt)
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);