aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-16 10:16:43 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-16 10:16:43 +0000
commitb6e2f87a61dd5af7088aab32cd8377c55925354c (patch)
tree22709b176c3ea472461907452fd3033574ef74ef
parent51d0678c29b8e49e838c85d0ee7e98210a105695 (diff)
downloadglibc-b6e2f87a61dd5af7088aab32cd8377c55925354c.tar
glibc-b6e2f87a61dd5af7088aab32cd8377c55925354c.tar.gz
glibc-b6e2f87a61dd5af7088aab32cd8377c55925354c.tar.bz2
glibc-b6e2f87a61dd5af7088aab32cd8377c55925354c.zip
Update.
2003-03-16 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/clock_settime.c (HANDLE_REALTIME): Define tv here, not at function level. * sysdeps/unix/clock_gettime.c (HANDLE_REALTIME): Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--nptl/ChangeLog3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h28
-rw-r--r--sysdeps/unix/clock_gettime.c2
-rw-r--r--sysdeps/unix/clock_settime.c2
5 files changed, 32 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index db3f21df6e..b0267dfeb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-16 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/clock_settime.c (HANDLE_REALTIME): Define tv here,
+ not at function level.
+ * sysdeps/unix/clock_gettime.c (HANDLE_REALTIME): Likewise.
+
2003-03-15 Roland McGrath <roland@redhat.com>
* nis/nss_nis/nis-hosts.c (internal_gethostbyname2_r): int -> size_t
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 9219b2753d..1bafd40f2b 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,8 @@
2003-03-16 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
+ zone versus inline asm stupidity. Use correct instructions.
+
* tst-rwlock6.c: Add some more status output.
2003-03-15 Roland McGrath <roland@redhat.com>
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index cd233bf47a..ef3867bfb9 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -67,7 +67,9 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden;
"jne 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %2, %%rsi\n\t" \
- "call __lll_mutex_lock_wait\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_mutex_lock_wait\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -84,7 +86,9 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden;
".subsection 1\n" \
"1:\tleaq %4, %%rdi\n\t" \
"movq %7, %%rdx\n\t" \
- "call __lll_mutex_timedlock_wait\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_mutex_timedlock_wait\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -101,7 +105,9 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden;
"jne 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %0, %%rdi\n\t" \
- "call __lll_mutex_unlock_wake\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_mutex_unlock_wake\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -152,7 +158,9 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
"jne 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %2, %%rsi\n\t" \
- "call __lll_lock_wait\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_lock_wait\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -167,7 +175,9 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
"jng 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %0, %%rdi\n\t" \
- "call __lll_unlock_wake\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_unlock_wake\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -201,7 +211,9 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
"jne 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %2, %%rsi\n\t" \
- "call __lll_lock_wait\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_lock_wait\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
@@ -219,7 +231,9 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
"jng 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %0, %%rdi\n\t" \
- "call __lll_unlock_wake\n\t" \
+ "subq $128, %%rsp\n\t" \
+ "callq __lll_unlock_wake\n\t" \
+ "addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index 4c26a370e6..b8b2b74e2f 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -41,13 +41,13 @@ extern int __pthread_clock_gettime (hp_timing_t freq, struct timespec *tp)
int
clock_gettime (clockid_t clock_id, struct timespec *tp)
{
- struct timeval tv;
int retval = -1;
switch (clock_id)
{
#define HANDLE_REALTIME \
do { \
+ struct timeval tv; \
retval = gettimeofday (&tv, NULL); \
if (retval == 0) \
/* Convert into `timespec'. */ \
diff --git a/sysdeps/unix/clock_settime.c b/sysdeps/unix/clock_settime.c
index 0ef0bccc67..069336a69e 100644
--- a/sysdeps/unix/clock_settime.c
+++ b/sysdeps/unix/clock_settime.c
@@ -40,7 +40,6 @@ extern void __pthread_clock_settime (hp_timing_t offset)
int
clock_settime (clockid_t clock_id, const struct timespec *tp)
{
- struct timeval tv;
int retval;
/* Make sure the time cvalue is OK. */
@@ -54,6 +53,7 @@ clock_settime (clockid_t clock_id, const struct timespec *tp)
{
#define HANDLE_REALTIME \
do { \
+ struct timeval tv; \
TIMESPEC_TO_TIMEVAL (&tv, tp); \
\
retval = settimeofday (&tv, NULL); \