summaryrefslogtreecommitdiff
path: root/pthread/pt-create.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
commit16a92d2765c5732abb64742cb5d387148e0ac629 (patch)
treeabbbadbf54f87eed25f71a312e43ce7f7cb7adfe /pthread/pt-create.c
parent9a231435f830c459c0e214c2b99877e2ed6edb56 (diff)
parent0096579c8bea920f7c42b40ea22db621da6480a5 (diff)
Merge commit 'refs/top-bases/t/fix_inline' into t/fix_inlinet/fix_inline
Conflicts: sysdeps/l4/hurd/pt-sysdep.h
Diffstat (limited to 'pthread/pt-create.c')
-rw-r--r--pthread/pt-create.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pthread/pt-create.c b/pthread/pt-create.c
index 346c697..4d81a95 100644
--- a/pthread/pt-create.c
+++ b/pthread/pt-create.c
@@ -22,7 +22,7 @@
#include <pthread.h>
#include <signal.h>
-#include <bits/atomic.h>
+#include <bits/pt-atomic.h>
#include <pt-internal.h>
@@ -38,8 +38,12 @@ __atomic_t __pthread_total;
/* The entry-point for new threads. */
static void
-entry_point (void *(*start_routine)(void *), void *arg)
+entry_point (struct __pthread *self, void *(*start_routine)(void *), void *arg)
{
+#ifdef ENABLE_TLS
+ ___pthread_self = self;
+#endif
+
#ifdef HAVE_USELOCALE
/* A fresh thread needs to be bound to the global locale. */
uselocale (LC_GLOBAL_LOCALE);