[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more info on boot crash
From: |
Marcus Brinkmann |
Subject: |
Re: more info on boot crash |
Date: |
Mon, 29 Jul 2002 19:38:41 +0200 |
User-agent: |
Mutt/1.4i |
On Mon, Jul 29, 2002 at 07:28:38PM +0200, Marcus Brinkmann wrote:
> Funny though that __hurd_threadvar_stack_mask is 0, too (in all threads, I
> think).
And that in the Hurd code, libthreads/stack.c doesn't set it anymore!
I am trying out this fix now (and will check it in if it works):
2002-07-29 Marcus Brinkmann <marcus@gnu.org>
* stack.c (stack_init): Put back in setting of the
__hurd_threadvar_stack_mask and __hurd_threadvar_stack_offset
variables.
Index: stack.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libthreads/stack.c,v
retrieving revision 1.8
diff -u -r1.8 stack.c
--- stack.c 27 May 2002 02:50:41 -0000 1.8
+++ stack.c 29 Jul 2002 17:37:36 -0000
@@ -331,6 +331,18 @@
cthread_stack_mask = cthread_stack_size - 1;
#endif /* defined(STACK_GROWTH_UP) */
+ /* Set up the variables so GNU can find its per-thread variables. */
+ __hurd_threadvar_stack_mask = ~(cthread_stack_size - 1);
+ /* The GNU per-thread variables will be stored just after the
+ cthread-self pointer at the base of the stack. */
+#ifdef STACK_GROWTH_UP
+ __hurd_threadvar_stack_offset = sizeof (ur_cthread_t *);
+#else
+ __hurd_threadvar_stack_offset = (cthread_stack_size -
+ sizeof (ur_cthread_t *) -
+ __hurd_threadvar_max * sizeof (long));
+#endif
+
/*
* Guess at first available region for stack.
*/
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus@gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/