-fix initial stacksize rounding

-minor indentation fix
This commit is contained in:
drochner 2012-03-09 12:06:44 +00:00
parent 0d42f2f215
commit 677d666c8d
1 changed files with 4 additions and 4 deletions

View File

@ -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
@ -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);