From 4032add80a847ddff3dff9d85163fc119013b9e2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Sep 2002 07:08:20 +0000 Subject: 2002-09-01 Roland McGrath * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro. (__libc_internal_tsd_address): Declare it. * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add __libc_internal_tsd_address. * specific.c (libc_internal_tsd_address): New function. (__libc_internal_tsd_address): New variable. * no-tsd.c (__libc_internal_tsd_address): New variable. --- linuxthreads/specific.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'linuxthreads/specific.c') 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 -- cgit v1.2.3