From 6782806d8f6664d87d17bb30f8ce4e0c7c931e17 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 17 Oct 2015 12:06:48 +0200 Subject: malloc: Rewrite with explicit TLS access using __thread --- sysdeps/generic/malloc-machine.h | 7 ------- sysdeps/mach/hurd/malloc-machine.h | 10 ---------- sysdeps/nptl/malloc-machine.h | 10 ---------- 3 files changed, 27 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h index 10f6e72..802d1f5 100644 --- a/sysdeps/generic/malloc-machine.h +++ b/sysdeps/generic/malloc-machine.h @@ -40,13 +40,6 @@ typedef int mutex_t; # define mutex_unlock(m) (*(m) = 0) # define MUTEX_INITIALIZER (0) -typedef void *tsd_key_t; -# define tsd_key_create(key, destr) do {} while(0) -# define tsd_setspecific(key, data) ((key) = (data)) -# define tsd_getspecific(key, vptr) (vptr = (key)) - -# define thread_atfork(prepare, parent, child) do {} while(0) - #endif /* !defined mutex_init */ #ifndef atomic_full_barrier diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h index 1fdbd3d..9221d1b 100644 --- a/sysdeps/mach/hurd/malloc-machine.h +++ b/sysdeps/mach/hurd/malloc-machine.h @@ -52,16 +52,6 @@ /* No we're *not* using pthreads. */ #define __pthread_initialize ((void (*)(void))0) -/* thread specific data for glibc */ - -#include - -typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ -__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ -#define tsd_key_create(key, destr) ((void) (key)) -#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) -#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) - /* madvise is a stub on Hurd, so don't bother calling it. */ #include diff --git a/sysdeps/nptl/malloc-machine.h b/sysdeps/nptl/malloc-machine.h index c0ec49e..8dea606 100644 --- a/sysdeps/nptl/malloc-machine.h +++ b/sysdeps/nptl/malloc-machine.h @@ -58,16 +58,6 @@ extern void *__dso_handle __attribute__ ((__weak__)); __linkin_atfork (&atfork_mem) #endif -/* thread specific data for glibc */ - -#include - -typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */ -__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ -#define tsd_key_create(key, destr) ((void) (key)) -#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) -#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) - #include #endif /* !defined(_MALLOC_MACHINE_H) */ -- cgit v1.1