From 983b18a6ff16f5687a9ece63a50d1831dec88609 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sun, 29 Dec 2013 14:06:43 +0100 Subject: Revert "Allow applications to set the default stack size" This reverts commit 536420a581f9f822cdef0fc460b5176a840f49e5. Now that threadvars have been replaced with TLS, this hack is no longer needed. --- pthread/pt-internal.h | 5 ++--- sysdeps/generic/pt-attr.c | 3 +-- sysdeps/mach/hurd/pt-sysdep.c | 14 -------------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h index 9e0bbe9..9747f1f 100644 --- a/pthread/pt-internal.h +++ b/pthread/pt-internal.h @@ -309,9 +309,8 @@ extern error_t __pthread_sigstate (struct __pthread *__restrict thread, int how, int clear_pending); -/* Default thread attributes. - FIXME Normally const, see sysdeps/mach/hurd/pt-sysdep.c. */ -extern struct __pthread_attr __pthread_default_attr; +/* Default thread attributes. */ +extern const struct __pthread_attr __pthread_default_attr; /* Default barrier attributes. */ extern const struct __pthread_barrierattr __pthread_default_barrierattr; diff --git a/sysdeps/generic/pt-attr.c b/sysdeps/generic/pt-attr.c index 4f95918..e501dc7 100644 --- a/sysdeps/generic/pt-attr.c +++ b/sysdeps/generic/pt-attr.c @@ -24,8 +24,7 @@ #include -/* FIXME Normally const, see sysdeps/mach/hurd/pt-sysdep.c. */ -struct __pthread_attr __pthread_default_attr = +const struct __pthread_attr __pthread_default_attr = { schedparam: { sched_priority: 0 }, stacksize: PTHREAD_STACK_DEFAULT, diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c index fd71aba..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 (); -- cgit v1.2.3