From 536420a581f9f822cdef0fc460b5176a840f49e5 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Mon, 3 Sep 2012 20:29:10 +0200 Subject: Allow applications to set the default stack size This change is a temporary hack intended for the Hurd servers. Once Hurd threadvars are replaced with TLS, this commit should be reverted. * pthread/pt-internal.h (__pthread_default_attr): Remove const qualifier. * sysdeps/generic/pt-attr.c (__pthread_default_attr): Likewise. * sysdeps/mach/hurd/pt-sysdep.c (__pthread_stack_default_size): New variable. (init_routine): Set __pthread_default_attr.stacksize if __pthread_stack_default_size exists. --- pthread/pt-internal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pthread/pt-internal.h') diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h index 067fb73..291baf5 100644 --- a/pthread/pt-internal.h +++ b/pthread/pt-internal.h @@ -292,8 +292,9 @@ extern error_t __pthread_sigstate (struct __pthread *__restrict thread, int how, int clear_pending); -/* Default thread attributes. */ -extern const struct __pthread_attr __pthread_default_attr; +/* Default thread attributes. + FIXME Normally const, see sysdeps/mach/hurd/pt-sysdep.c. */ +extern struct __pthread_attr __pthread_default_attr; /* Default barrier attributes. */ extern const struct __pthread_barrierattr __pthread_default_barrierattr; -- cgit v1.2.3