summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/pt-sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/pt-sysdep.c')
-rw-r--r--sysdeps/mach/hurd/pt-sysdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c
index f40fee5..95a4d36 100644
--- a/sysdeps/mach/hurd/pt-sysdep.c
+++ b/sysdeps/mach/hurd/pt-sysdep.c
@@ -28,8 +28,6 @@
#include <pt-internal.h>
-__thread struct __pthread *___pthread_self;
-
/* Forward. */
static void *init_routine (void);
@@ -53,7 +51,8 @@ init_routine (void)
err = __pthread_create_internal (&thread, 0, 0, 0);
assert_perror (err);
- ___pthread_self = thread;
+ ((void **) (__hurd_threadvar_stack_offset))[_HURD_THREADVAR_THREAD]
+ = thread;
/* Decrease the number of threads, to take into account that the
signal thread (which will be created by the glibc startup code