summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-11-19 22:58:49 +0000
committerUlrich Drepper <drepper@redhat.com>1997-11-19 22:58:49 +0000
commit94689d261f1489e3c9f464fd04d515425a6b955b (patch)
tree19601189490936da9cd4fc6d0efe1ea41b3cb8a0 /malloc
parent0982ec01496269c07052881626b11754e578ff07 (diff)
Remove malloc_key-data definition.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/thread-m.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/malloc/thread-m.h b/malloc/thread-m.h
index 8307f256ff..60a87a7850 100644
--- a/malloc/thread-m.h
+++ b/malloc/thread-m.h
@@ -38,23 +38,18 @@ typedef pthread_t thread_id;
typedef pthread_mutex_t mutex_t;
/* thread specific data */
-typedef pthread_key_t tsd_key_t;
+typedef void * tsd_key_t;
#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-static Void_t *malloc_key_data;
-
-#define tsd_key_create(key, destr) \
- if (__pthread_key_create != NULL) { \
- __pthread_key_create(key, destr); \
- } else { *(key) = (tsd_key_t) 0; }
+#define tsd_key_create(key, destr) ( *(key) = NULL )
#define tsd_setspecific(key, data) \
- if (__pthread_setspecific != NULL) { \
- __pthread_setspecific(key, data); \
- } else { malloc_key_data = (Void_t *) data; }
+ if (__libc_internal_tsd_set != NULL) { \
+ __libc_internal_tsd_set(_LIBC_TSD_KEY_MALLOC, data); \
+ } else { (key) = (Void_t *) data; }
#define tsd_getspecific(key, vptr) \
- (vptr = (__pthread_getspecific != NULL \
- ? __pthread_getspecific(key) : malloc_key_data))
+ (vptr = (__libc_internal_tsd_get != NULL \
+ ? __libc_internal_tsd_get(_LIBC_TSD_KEY_MALLOC) : (key)))
#define mutex_init(m) \
(__pthread_mutex_init != NULL ? __pthread_mutex_init (m, NULL) : 0)