about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/_Fork.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c
index 77cd29171e..9981699a5a 100644
--- a/sysdeps/mach/hurd/_Fork.c
+++ b/sysdeps/mach/hurd/_Fork.c
@@ -481,13 +481,11 @@ retry:
 				    MACHINE_THREAD_STATE_FLAVOR,
 				    (natural_t *) &state, &statecount))
 	LOSE;
-#ifdef STACK_GROWTH_UP
-      state.SP = __hurd_sigthread_stack_base;
-#else
-      state.SP = __hurd_sigthread_stack_end;
-#endif
-      MACHINE_THREAD_STATE_SET_PC (&state,
-				   (unsigned long int) _hurd_msgport_receive);
+
+      MACHINE_THREAD_STATE_SETUP_CALL(&state,
+	  __hurd_sigthread_stack_base,
+	  __hurd_sigthread_stack_end - __hurd_sigthread_stack_base,
+	  (uintptr_t) _hurd_msgport_receive);
 
       /* Do special signal thread setup for TLS if needed.  */
       if (err = _hurd_tls_fork (sigthread, _hurd_msgport_thread, &state))