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, 3 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.c b/sysdeps/mach/hurd/pt-sysdep.c
index 95a4d36..f40fee5 100644
--- a/sysdeps/mach/hurd/pt-sysdep.c
+++ b/sysdeps/mach/hurd/pt-sysdep.c
@@ -28,6 +28,8 @@
#include <pt-internal.h>
+__thread struct __pthread *___pthread_self;
+
/* Forward. */
static void *init_routine (void);
@@ -51,8 +53,7 @@ init_routine (void)
err = __pthread_create_internal (&thread, 0, 0, 0);
assert_perror (err);
- ((void **) (__hurd_threadvar_stack_offset))[_HURD_THREADVAR_THREAD]
- = thread;
+ ___pthread_self = thread;
/* Decrease the number of threads, to take into account that the
signal thread (which will be created by the glibc startup code