diff options
Diffstat (limited to 'sysdeps/l4/hurd/ia32')
-rw-r--r-- | sysdeps/l4/hurd/ia32/pt-setup.c | 16 | ||||
-rw-r--r-- | sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c | 6 |
2 files changed, 12 insertions, 10 deletions
diff --git a/sysdeps/l4/hurd/ia32/pt-setup.c b/sysdeps/l4/hurd/ia32/pt-setup.c index f5987797..cc2f0757 100644 --- a/sysdeps/l4/hurd/ia32/pt-setup.c +++ b/sysdeps/l4/hurd/ia32/pt-setup.c @@ -1,4 +1,4 @@ -/* Setup thread stack. Hurd/i386 version. +/* Setup thread stack. Viengoos/i386 version. Copyright (C) 2000, 2002, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -96,14 +96,16 @@ __pthread_setup (struct __pthread *thread, if (__pthread_num_threads == 1) return 0; - assert (! ADDR_IS_VOID (thread->exception_page.addr)); + assert (! ADDR_IS_VOID (thread->exception_area[0])); - struct exception_page *exception_page - = ADDR_TO_PTR (addr_extend (thread->exception_page.addr, - 0, PAGESIZE_LOG2)); + struct exception_page *exception_page = thread->exception_area_va; - /* SP is set to the end of the exception page. */ - exception_page->exception_handler_sp = (uintptr_t) exception_page + PAGESIZE; + /* SP is set to the end of the exception area minus one word, which + is the location of the exception page. */ + exception_page->exception_handler_sp + = (uintptr_t) thread->exception_area_va + EXCEPTION_AREA_SIZE; + exception_page->exception_handler_sp -= sizeof (void *); + * (void **) exception_page->exception_handler_sp = thread->exception_area_va; exception_page->exception_handler_ip = (uintptr_t) &exception_handler_entry; exception_page->exception_handler_end = (uintptr_t) &exception_handler_end; diff --git a/sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c b/sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c index bb6ac2a5..37ef8215 100644 --- a/sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c +++ b/sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c @@ -124,13 +124,13 @@ signal_dispatch_lowlevel (struct signal_state *ss, pthread_t tid, struct hurd_thread_exregs_out out; error_t err; - err = rm_thread_exregs (ADDR_VOID, thread->object.addr, + err = rm_thread_exregs (ADDR_VOID, thread->object, HURD_EXREGS_STOP | HURD_EXREGS_ABORT_IPC | HURD_EXREGS_GET_REGS, in, &out); if (err) panic ("Failed to modify thread " ADDR_FMT, - ADDR_PRINTF (thread->object.addr)); + ADDR_PRINTF (thread->object)); intr_sp = out.sp; @@ -205,7 +205,7 @@ signal_dispatch_lowlevel (struct signal_state *ss, pthread_t tid, in.sp = sp; in.ip = (uintptr_t) &_signal_dispatch_entry; - rm_thread_exregs (ADDR_VOID, thread->object.addr, + rm_thread_exregs (ADDR_VOID, thread->object, HURD_EXREGS_SET_SP_IP | HURD_EXREGS_START | HURD_EXREGS_ABORT_IPC, in, &out); |