aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-09-22 07:29:50 +0000
committerRoland McGrath <roland@gnu.org>2005-09-22 07:29:50 +0000
commit5eac47606bdec9aa2c4ea52bc0c907b5bb54c4b8 (patch)
treebaded91f2f5267e4e9232835b632f4905f97c9c4
parentf7ffeb91cd6622472b425f8fa12c577c582ed16c (diff)
downloadglibc-5eac47606bdec9aa2c4ea52bc0c907b5bb54c4b8.zip
glibc-5eac47606bdec9aa2c4ea52bc0c907b5bb54c4b8.tar.gz
glibc-5eac47606bdec9aa2c4ea52bc0c907b5bb54c4b8.tar.bz2
* elf/dl-tsd.c (__libc_dl_error_tsd): Use attribute_tls_model_ie for
static __thread variable. From Alexandre Oliva <aoliva@redhat.com>
-rw-r--r--ChangeLog4
-rw-r--r--elf/dl-tsd.c4
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/perf.c7
4 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b02a19..9f4e285 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-09-22 Roland McGrath <roland@redhat.com>
+ * elf/dl-tsd.c (__libc_dl_error_tsd): Use attribute_tls_model_ie for
+ static __thread variable.
+ From Alexandre Oliva <aoliva@redhat.com>
+
* Makefile ($(objpfx)c++-types-check.out): Use $<, not $^, in command.
Reported by Alexandre Oliva <aoliva@redhat.com>.
diff --git a/elf/dl-tsd.c b/elf/dl-tsd.c
index f44fa7d..f01f8d6 100644
--- a/elf/dl-tsd.c
+++ b/elf/dl-tsd.c
@@ -1,5 +1,5 @@
/* Thread-local data used by error handling for runtime dynamic linker.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +49,7 @@ void **(*_dl_error_catch_tsd) (void) __attribute__ ((const))
void ** __attribute__ ((const))
__libc_dl_error_tsd (void)
{
- static __thread void *data;
+ static __thread void *data attribute_tls_model_ie;
return &data;
}
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c1da34a..4884cc2 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-22 Roland McGrath <roland@redhat.com>
+
+ * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
+ ../sysdeps/x86_64/hp-timing.h).
+
2005-08-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
diff --git a/nptl/perf.c b/nptl/perf.c
index 5b920d7..f0dbc29 100644
--- a/nptl/perf.c
+++ b/nptl/perf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -705,6 +705,11 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
#ifdef i386
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var))
+#elif defined __x86_64__
+# define HP_TIMING_NOW(Var) \
+ ({ unsigned int _hi, _lo; \
+ asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
+ (Var) = ((unsigned long long int) _hi << 32) | _lo; })
#elif defined __ia64__
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mov %0=ar.itc" : "=r" (Var) : : "memory")
#else