summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authorkurt <kurt@openbsd.org>2009-04-21 12:43:01 +0000
committerkurt <kurt@openbsd.org>2009-04-21 12:43:01 +0000
commitf75388a7094113128876d5bd9f1a51f3544813ef (patch)
tree9fb687ae1fd1e05e4c2f26dc90ddf93b323f61f5 /lib/libpthread
parenttweak PARAMETERS; (diff)
downloadwireguard-openbsd-f75388a7094113128876d5bd9f1a51f3544813ef.tar.xz
wireguard-openbsd-f75388a7094113128876d5bd9f1a51f3544813ef.zip
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