summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/pthread_private.h
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2005-02-28 17:15:31 +0000
committermarcus <marcus@FreeBSD.org>2005-02-28 17:15:31 +0000
commit3bc669b0fc23485773f1fb98a7cfad823a34bf26 (patch)
tree3fdd1ce4aacb9c5b8f3732cdc071f0d2466f205b /lib/libc_r/uthread/pthread_private.h
parent6e3e336d4e8eeab836e05129e5d14567f1b6b9f0 (diff)
downloadFreeBSD-src-3bc669b0fc23485773f1fb98a7cfad823a34bf26.zip
FreeBSD-src-3bc669b0fc23485773f1fb98a7cfad823a34bf26.tar.gz
Increase the default stacksizes:
32-bit 64-bit main thread 2 MB 4 MB other threads 1 MB 2 MB Adapted from: libpthread Approved by: deischen
Diffstat (limited to 'lib/libc_r/uthread/pthread_private.h')
-rw-r--r--lib/libc_r/uthread/pthread_private.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h
index 0d49da1..8e74368 100644
--- a/lib/libc_r/uthread/pthread_private.h
+++ b/lib/libc_r/uthread/pthread_private.h
@@ -481,11 +481,9 @@ struct pthread_attr {
/*
* Miscellaneous definitions.
*/
-#if !defined(__ia64__)
-#define PTHREAD_STACK_DEFAULT 65536
-#else
-#define PTHREAD_STACK_DEFAULT 0x40000
-#endif
+#define PTHREAD_STACK32_DEFAULT (1 * 1024 * 1024)
+#define PTHREAD_STACK64_DEFAULT (2 * 1024 * 1024)
+
/*
* Size of default red zone at the end of each stack. In actuality, this "red
* zone" is merely an unmapped region, except in the case of the initial stack.
@@ -498,16 +496,17 @@ extern int _pthread_guard_default;
extern int _pthread_page_size;
+extern int _pthread_stack_default;
+
+extern int _pthread_stack_initial;
+
/*
* 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
* almost entirely on this stack.
*/
-#if !defined(__ia64__)
-#define PTHREAD_STACK_INITIAL 0x100000
-#else
-#define PTHREAD_STACK_INITIAL 0x400000
-#endif
+#define PTHREAD_STACK32_INITIAL (2 * 1024 * 1024)
+#define PTHREAD_STACK64_INITIAL (4 * 1024 * 1024)
/*
* Define the different priority ranges. All applications have thread
@@ -1040,7 +1039,7 @@ SCLASS struct pthread_attr _pthread_attr_default
#ifdef GLOBAL_PTHREAD_PRIVATE
= { SCHED_RR, 0, TIMESLICE_USEC, PTHREAD_DEFAULT_PRIORITY,
PTHREAD_CREATE_RUNNING, PTHREAD_CREATE_JOINABLE, NULL, NULL, NULL,
- PTHREAD_STACK_DEFAULT, -1 };
+ -1, -1 };
#else
;
#endif
OpenPOWER on IntegriCloud