aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-29 00:21:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-29 00:21:13 +0000
commit57fd328159ed0039352f8b2e5d90ce8eea11b90d (patch)
treea9f8239de1c95f1733b51f2901126480730f0083 /toolchain/uClibc
parent61b4f9ffdc0d2dfe42511b294ea354a0aaac32ec (diff)
downloadmaster-187ad058-57fd328159ed0039352f8b2e5d90ce8eea11b90d.tar.gz
master-187ad058-57fd328159ed0039352f8b2e5d90ce8eea11b90d.tar.bz2
master-187ad058-57fd328159ed0039352f8b2e5d90ce8eea11b90d.zip
uClibc: use the arch specific thread stack size for nptl if the size returned by getrlimits exceeds it - fixes threads on systems with only 16 MB RAM
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25223 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/uClibc')
-rw-r--r--toolchain/uClibc/patches-0.9.32/190-nptl_use_arch_default_stack_limit.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.32/190-nptl_use_arch_default_stack_limit.patch b/toolchain/uClibc/patches-0.9.32/190-nptl_use_arch_default_stack_limit.patch
new file mode 100644
index 0000000000..5433f3b488
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.32/190-nptl_use_arch_default_stack_limit.patch
@@ -0,0 +1,13 @@
+--- a/libpthread/nptl/init.c
++++ b/libpthread/nptl/init.c
+@@ -401,6 +401,10 @@ __pthread_initialize_minimal_internal (v
+ Use the minimal size acceptable. */
+ limit.rlim_cur = PTHREAD_STACK_MIN;
+
++ /* Do not exceed architecture specific default */
++ if (limit.rlim_cur > ARCH_STACK_DEFAULT_SIZE)
++ limit.rlim_cur = ARCH_STACK_DEFAULT_SIZE;
++
+ /* Make sure it meets the minimum size that allocate_stack
+ (allocatestack.c) will demand, which depends on the page size. */
+ const uintptr_t pagesz = sysconf (_SC_PAGESIZE);