summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 00:55:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 00:55:25 +0100
commit5f1d2dc2c9f4bccf52e05530e7e323d4f638a3d6 (patch)
tree126e7839b767829e1592a18795e7ab939fa7cf1f
parent38fcb62931a57374a660b447322fb6f01ad16088 (diff)
parent13cb6162f659446cb7bdb0a6c3cf1d9efe8218f1 (diff)
Merge commit 'refs/top-bases/t/2.19-fix' into t/2.19-fix
-rw-r--r--sysdeps/mach/hurd/Versions4
-rw-r--r--sysdeps/mach/hurd/bits/libc-lock.h6
-rw-r--r--sysdeps/mach/hurd/cthreads.c13
3 files changed, 3 insertions, 20 deletions
diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index f760a80401..7cab8e8551 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -6,7 +6,7 @@ libc {
GLIBC_PRIVATE {
# Functions shared with the dynamic linker
__libc_read; __libc_write; __libc_lseek64;
- __libc_lock_self0; __libc_get_lock_self;
+ __libc_lock_self0;
_dl_init_first;
}
@@ -32,6 +32,6 @@ ld {
# functions that must be shared with libc
__libc_read; __libc_write; __libc_lseek64;
- __libc_lock_self0; __libc_get_lock_self;
+ __libc_lock_self0;
}
}
diff --git a/sysdeps/mach/hurd/bits/libc-lock.h b/sysdeps/mach/hurd/bits/libc-lock.h
index a0f83728e4..b8b7bec8bf 100644
--- a/sysdeps/mach/hurd/bits/libc-lock.h
+++ b/sysdeps/mach/hurd/bits/libc-lock.h
@@ -35,11 +35,7 @@ typedef struct
typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
extern char __libc_lock_self0[0];
-/* We have to hide the __libc_lock_self access behind a function call,
- otherwise gcc >= 4.9 would try to prefetch the TLS dereference even before
- the __LIBC_NO_TLS test is finished... */
-extern void *__libc_get_lock_self(void);
-#define __libc_lock_owner_self() (__LIBC_NO_TLS() ? &__libc_lock_self0 : __libc_get_lock_self())
+#define __libc_lock_owner_self() (__LIBC_NO_TLS() ? &__libc_lock_self0 : THREAD_SELF)
#else
typedef struct __libc_lock_opaque__ __libc_lock_t;
diff --git a/sysdeps/mach/hurd/cthreads.c b/sysdeps/mach/hurd/cthreads.c
index 273cd0f8a2..e25fcd0962 100644
--- a/sysdeps/mach/hurd/cthreads.c
+++ b/sysdeps/mach/hurd/cthreads.c
@@ -20,19 +20,6 @@
#include <stdlib.h>
char __libc_lock_self0[0];
-#if IS_IN_rtld
-/* We don't support static tls relocation so early, but we do not have threads
- there either anyway. */
-static char __libc_lock_self[0];
-#else
-static __thread char __libc_lock_self[0];
-#endif
-
-void *
-__libc_get_lock_self(void)
-{
- return (void*) &__libc_lock_self;
-}
/* Placeholder for key creation routine from Hurd cthreads library. */
int