summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/fork.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-10-25 00:37:58 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-10-25 00:37:58 +0200
commitb3320e243e29a0451fb5aa6d39c6bfe2200504dc (patch)
treea891ebd96306e43ac22ff900a3d9b07861f3122a /sysdeps/mach/hurd/fork.c
parent4c23967459c21ee7627dd8fd3782f1671416a206 (diff)
Drop threadvars entirely
Diffstat (limited to 'sysdeps/mach/hurd/fork.c')
-rw-r--r--sysdeps/mach/hurd/fork.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index c3f88a90d8..6e7fe5f1ee 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <hurd.h>
#include <hurd/signal.h>
+#include <hurd/threadvar.h>
#include <setjmp.h>
#include <thread_state.h>
#include <sysdep.h> /* For stack growth direction. */
@@ -497,19 +498,17 @@ __fork (void)
(natural_t *) &state, &statecount))
LOSE;
#if STACK_GROWTH_UP
-#define THREADVAR_SPACE (__hurd_threadvar_max \
- * sizeof *__hurd_sightread_variables)
if (__hurd_sigthread_stack_base == 0)
{
state.SP &= __hurd_threadvar_stack_mask;
- state.SP += __hurd_threadvar_stack_offset + THREADVAR_SPACE;
+ state.SP += __hurd_threadvar_stack_offset;
}
else
state.SP = __hurd_sigthread_stack_base;
#else
if (__hurd_sigthread_stack_end == 0)
{
- /* The signal thread has a normal stack assigned by cthreads.
+ /* The signal thread has a stack assigned by cthreads.
The threadvar_stack variables conveniently tell us how
to get to the highest address in the stack, just below
the per-thread variables. */