Module Name: src
Committed By: christos
Date: Wed Dec 22 22:41:46 UTC 2010
Modified Files:
src/lib/libpthread: pthread.c
Log Message:
use pthread__stacksize since size has not been initialized yet.
To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 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.119 src/lib/libpthread/pthread.c:1.120
--- src/lib/libpthread/pthread.c:1.119 Wed Dec 22 17:19:46 2010
+++ src/lib/libpthread/pthread.c Wed Dec 22 17:41:45 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.119 2010/12/22 22:19:46 christos Exp $ */
+/* $NetBSD: pthread.c,v 1.120 2010/12/22 22:41:45 christos 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.119 2010/12/22 22:19:46 christos Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.120 2010/12/22 22:41:45 christos Exp $");
#define __EXPOSE_STACK 1
@@ -1227,7 +1227,8 @@
pthread__mainbase = (vaddr_t)base;
base = STACK_GROW(base, pthread__stacksize);
pthread__mainstruct = (vaddr_t)base;
- if (mprotect(base, size, PROT_READ|PROT_WRITE) == -1)
+ if (mprotect(base, pthread__stacksize,
+ PROT_READ|PROT_WRITE) == -1)
err(1, "mprotect stack");
}
size = pthread__stacksize;