uClibc: use the arch specific thread stack size for nptl if the size returned by...
authorFelix Fietkau <nbd@openwrt.org>
Sat, 29 Jan 2011 00:21:13 +0000 (00:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 29 Jan 2011 00:21:13 +0000 (00:21 +0000)
SVN-Revision: 25223

toolchain/uClibc/patches-0.9.32/190-nptl_use_arch_default_stack_limit.patch [new file with mode: 0644]

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 (file)
index 0000000..5433f3b
--- /dev/null
@@ -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);