aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/thread.c b/src/thread.c
index 3f9595274e9..0bb0b7e006a 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -645,17 +645,12 @@ run_thread (void *state)
645{ 645{
646 /* Make sure stack_top and m_stack_bottom are properly aligned as GC 646 /* Make sure stack_top and m_stack_bottom are properly aligned as GC
647 expects. */ 647 expects. */
648 union 648 max_align_t stack_pos;
649 {
650 void *p;
651 char c;
652 } stack_pos;
653 649
654 struct thread_state *self = state; 650 struct thread_state *self = state;
655 struct thread_state **iter; 651 struct thread_state **iter;
656 652
657 self->m_stack_bottom = &stack_pos.c; 653 self->m_stack_bottom = self->stack_top = (char *) &stack_pos;
658 self->stack_top = &stack_pos.c;
659 self->thread_id = sys_thread_self (); 654 self->thread_id = sys_thread_self ();
660 655
661 acquire_global_lock (self); 656 acquire_global_lock (self);