Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread use pthread__stacksize since size has not bee...
details: https://anonhg.NetBSD.org/src/rev/acd19a192cd2
branches: trunk
changeset: 759991:acd19a192cd2
user: christos <christos%NetBSD.org@localhost>
date: Wed Dec 22 22:41:45 2010 +0000
description:
use pthread__stacksize since size has not been initialized yet.
diffstat:
lib/libpthread/pthread.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r de911469e493 -r acd19a192cd2 lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c Wed Dec 22 22:29:19 2010 +0000
+++ b/lib/libpthread/pthread.c Wed Dec 22 22:41:45 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index