diff options
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/thread.c b/src/thread.c index df1a7053826..b638dd77f8b 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -717,12 +717,17 @@ run_thread (void *state) | |||
| 717 | { | 717 | { |
| 718 | /* Make sure stack_top and m_stack_bottom are properly aligned as GC | 718 | /* Make sure stack_top and m_stack_bottom are properly aligned as GC |
| 719 | expects. */ | 719 | expects. */ |
| 720 | max_align_t stack_pos; | 720 | union |
| 721 | { | ||
| 722 | Lisp_Object o; | ||
| 723 | void *p; | ||
| 724 | char c; | ||
| 725 | } stack_pos; | ||
| 721 | 726 | ||
| 722 | struct thread_state *self = state; | 727 | struct thread_state *self = state; |
| 723 | struct thread_state **iter; | 728 | struct thread_state **iter; |
| 724 | 729 | ||
| 725 | self->m_stack_bottom = self->stack_top = (char *) &stack_pos; | 730 | self->m_stack_bottom = self->stack_top = &stack_pos.c; |
| 726 | self->thread_id = sys_thread_self (); | 731 | self->thread_id = sys_thread_self (); |
| 727 | 732 | ||
| 728 | if (self->thread_name) | 733 | if (self->thread_name) |