diff options
Diffstat (limited to 'sysdeps/mach/hurd/pt-sysdep.c')
-rw-r--r-- | sysdeps/mach/hurd/pt-sysdep.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c index 09f0dcb..038d614 100644 --- a/sysdeps/mach/hurd/pt-sysdep.c +++ b/sysdeps/mach/hurd/pt-sysdep.c @@ -28,16 +28,6 @@ __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); @@ -54,10 +44,6 @@ 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 (); @@ -65,6 +51,11 @@ init_routine (void) err = __pthread_create_internal (&thread, 0, 0, 0); assert_perror (err); + /* XXX The caller copies the command line arguments and the environment + to the new stack. Pretend it wasn't allocated so that it remains + valid if the main thread terminates. */ + thread->stack = 0; + ___pthread_self = thread; /* Decrease the number of threads, to take into account that the |