about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--linuxthreads/Versions4
-rw-r--r--linuxthreads/no-tsd.c2
-rw-r--r--linuxthreads/specific.c9
3 files changed, 15 insertions, 0 deletions
diff --git a/linuxthreads/Versions b/linuxthreads/Versions
index 3124814d99..ec4e8730b3 100644
--- a/linuxthreads/Versions
+++ b/linuxthreads/Versions
@@ -20,6 +20,8 @@ libc {
   GLIBC_PRIVATE {
     # Internal libc interface to libpthread
     __libc_internal_tsd_get; __libc_internal_tsd_set;
+    __libc_internal_tsd_address;
+
   }
 }
 
@@ -27,6 +29,7 @@ ld {
   GLIBC_PRIVATE {
     # Internal libc interface to libpthread
     __libc_internal_tsd_get; __libc_internal_tsd_set;
+    __libc_internal_tsd_address;
   }
 }
 
@@ -160,6 +163,7 @@ libpthread {
   GLIBC_PRIVATE {
     # Internal libc interface to libpthread
     __libc_internal_tsd_get; __libc_internal_tsd_set;
+    __libc_internal_tsd_address;
     __pthread_kill_other_threads_np;
   }
 }
diff --git a/linuxthreads/no-tsd.c b/linuxthreads/no-tsd.c
index f3ae190b4f..099e7b49ae 100644
--- a/linuxthreads/no-tsd.c
+++ b/linuxthreads/no-tsd.c
@@ -34,5 +34,7 @@
 void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t);
 int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t,
 				__const void *);
+void **(*__libc_internal_tsd_address) (enum __libc_tsd_key_t)
+     __THROW __attribute__ ((__const__));
 
 #endif /* !(USE_TLS && HAVE___THREAD) */
diff --git a/linuxthreads/specific.c b/linuxthreads/specific.c
index caa67360ec..c5d742d978 100644
--- a/linuxthreads/specific.c
+++ b/linuxthreads/specific.c
@@ -229,4 +229,13 @@ libc_internal_tsd_get(enum __libc_tsd_key_t key)
 void * (*__libc_internal_tsd_get)(enum __libc_tsd_key_t key)
      = libc_internal_tsd_get;
 
+static void ** __attribute__ ((__const__))
+libc_internal_tsd_address (enum __libc_tsd_key_t key)
+{
+  pthread_descr self = thread_self();
+  return &self->p_libc_specific[key];
+}
+void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t key)
+     __THROW __attribute__ ((__const__)) = libc_internal_tsd_address;
+
 #endif