summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mach/setup-thread.c2
-rw-r--r--sysdeps/mach/hurd/fork.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/mach/setup-thread.c b/mach/setup-thread.c
index 7c2889f8ba..a59012785d 100644
--- a/mach/setup-thread.c
+++ b/mach/setup-thread.c
@@ -74,7 +74,7 @@ __mach_setup_thread (task_t task, thread_t thread, void *pc,
*stack_size = size;
memset (&ts, 0, sizeof (ts));
- ts.PC = (int) pc;
+ MACHINE_THREAD_STATE_SET_PC (&ts, pc);
#ifdef STACK_GROWTH_DOWN
if (stack_base)
*stack_base = stack + __vm_page_size;
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index 4dd0364f45..f2529c1f38 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -400,7 +400,8 @@ __fork (void)
#else
state.SP = __hurd_sigthread_stack_end;
#endif
- state.PC = (unsigned long int) _hurd_msgport_receive;
+ MACHINE_THREAD_STATE_SET_PC (&state,
+ (unsigned long int) _hurd_msgport_receive);
if (err = __thread_set_state (sigthread, MACHINE_THREAD_STATE_FLAVOR,
(int *) &state, statecount))
goto lose;