summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/pt-sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/pt-sysdep.c')
-rw-r--r--sysdeps/mach/hurd/pt-sysdep.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c
index f40fee5..882af69 100644
--- a/sysdeps/mach/hurd/pt-sysdep.c
+++ b/sysdeps/mach/hurd/pt-sysdep.c
@@ -30,6 +30,16 @@
__thread struct __pthread *___pthread_self;
+/* Allow programs that know about this library to override the default stack
+ size.
+
+ FIXME Stack sizes should normally be set at thread creation time using the
+ standard interface, but Hurd threadvars have special alignment constraints.
+ Until they are completely replaced with correct TLS, make this hack
+ available. */
+extern size_t __pthread_stack_default_size;
+weak_extern(__pthread_stack_default_size);
+
/* Forward. */
static void *init_routine (void);
@@ -46,6 +56,10 @@ init_routine (void)
struct __pthread *thread;
int err;
+ /* FIXME */
+ if (&__pthread_stack_default_size != NULL)
+ __pthread_default_attr.stacksize = __pthread_stack_default_size;
+
/* Initialize the library. */
__pthread_init ();