summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/init.c6
-rw-r--r--libpthread/nptl/pthreadP.h1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index 4959d5ed8..5d25ded7d 100644
--- a/libpthread/nptl/init.c
+++ b/libpthread/nptl/init.c
@@ -337,3 +337,9 @@ __pthread_initialize_minimal_internal (void)
}
strong_alias (__pthread_initialize_minimal_internal,
__pthread_initialize_minimal)
+
+size_t
+__pthread_get_minstack (const pthread_attr_t *attr)
+{
+ return __static_tls_size + PTHREAD_STACK_MIN;
+}
diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
index 13205512a..c686a4ca5 100644
--- a/libpthread/nptl/pthreadP.h
+++ b/libpthread/nptl/pthreadP.h
@@ -377,6 +377,7 @@ weak_function;
extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
+extern size_t __pthread_get_minstack (const pthread_attr_t *attr);
/* Namespace save aliases. */
extern int __pthread_getschedparam (pthread_t thread_id, int *policy,
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
index 514913317..60f2a724c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
@@ -164,7 +164,7 @@ __start_helper_thread (void)
and should go away automatically when canceled. */
pthread_attr_t attr;
(void) pthread_attr_init (&attr);
- (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+ (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
/* Block all signals in the helper thread but SIGSETXID. To do this
thoroughly we temporarily have to block all signals here. The