summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2009-04-21 12:43:02 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2009-04-21 12:43:02 +0000
commit48a0ce88ffaff2b978b8b7ead7d4e23112036ed2 (patch)
tree2d56a3894550e72f51be418f344ecd4b07056cc2 /lib/libpthread
parent530321b86c8778ad43eb3d5318c41b32c694a37e (diff)
Increase default thread stack size to 256K on 32bit archs and 512K on
64bit archs to accommodate the growing number of ports that put large buffers on the stack. Supported by many with no objections.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/uthread/pthread_private.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h
index 5ed8fab9c08..3f324536d46 100644
--- a/lib/libpthread/uthread/pthread_private.h
+++ b/lib/libpthread/uthread/pthread_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_private.h,v 1.70 2008/12/18 09:30:32 guenther Exp $ */
+/* $OpenBSD: pthread_private.h,v 1.71 2009/04/21 12:43:01 kurt Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -388,7 +388,12 @@ enum pthread_susp {
/*
* Miscellaneous definitions.
*/
-#define PTHREAD_STACK_DEFAULT 65536
+#ifdef __LP64__
+#define PTHREAD_STACK_DEFAULT (512 * 1024)
+#else
+#define PTHREAD_STACK_DEFAULT (256 * 1024)
+#endif
+
/*
* Maximum size of initial thread's stack. This perhaps deserves to be larger
* than the stacks of other threads, since many applications are likely to run