summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/specific.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-04 03:45:56 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-04 03:45:56 +0000
commite9264e49f3777c298e8a734cf4483c26b2602584 (patch)
treebc99d793d97a1d73bc55a256f6983c5d26fcc925 /libpthread/linuxthreads.old/specific.c
parentcd662e64be1b10615e2fb44d5f3dc97eca905a31 (diff)
update pthread weak handling to the style glibc uses
Diffstat (limited to 'libpthread/linuxthreads.old/specific.c')
-rw-r--r--libpthread/linuxthreads.old/specific.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/libpthread/linuxthreads.old/specific.c b/libpthread/linuxthreads.old/specific.c
index 42be6043c..509ee6665 100644
--- a/libpthread/linuxthreads.old/specific.c
+++ b/libpthread/linuxthreads.old/specific.c
@@ -168,36 +168,32 @@ void __pthread_destroy_specifics()
__pthread_unlock(THREAD_GETMEM(self, p_lock));
}
+#if !(USE_TLS && HAVE___THREAD)
/* Thread-specific data for libc. */
-#if !(USE_TLS && HAVE___THREAD)
-static int
-libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * pointer)
+
+int
+__pthread_internal_tsd_set (int key, const void * pointer)
{
- pthread_descr self = thread_self();
+ pthread_descr self = thread_self();
- THREAD_SETMEM_NC(self, p_libc_specific[key], (void *) pointer);
- return 0;
+ THREAD_SETMEM_NC(self, p_libc_specific[key], (void *) pointer);
+ return 0;
}
-int (*__libc_internal_tsd_set)(enum __libc_tsd_key_t key, const void * pointer)
- = libc_internal_tsd_set;
-static void *
-libc_internal_tsd_get(enum __libc_tsd_key_t key)
+void *
+__pthread_internal_tsd_get (int key)
{
- pthread_descr self = thread_self();
+ pthread_descr self = thread_self();
- return THREAD_GETMEM_NC(self, p_libc_specific[key]);
+ return THREAD_GETMEM_NC(self, p_libc_specific[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)
+void ** __attribute__ ((__const__))
+__pthread_internal_tsd_address (int key)
{
- pthread_descr self = thread_self();
- return &self->p_libc_specific[key];
+ pthread_descr self = thread_self();
+ return &self->p_libc_specific[key];
}
-void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t key)
- __attribute__ ((__const__)) = libc_internal_tsd_address;
+
#endif