aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-01 08:52:38 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-01 08:52:38 +0000
commit80b5421740a2aeed70072c378762005b671086af (patch)
tree8ec9e742adb052f5f9b2a7c246ca24f3712c093e /nptl
parent31195be25b5cd8e88426ab2496eaeb4d508b0764 (diff)
downloadglibc-80b5421740a2aeed70072c378762005b671086af.zip
glibc-80b5421740a2aeed70072c378762005b671086af.tar.gz
glibc-80b5421740a2aeed70072c378762005b671086af.tar.bz2
Update.
2003-06-01 Ulrich Drepper <drepper@redhat.com> * elf/Makefile (CFLAGS-dl-runtime.c): Define. * wcsmbs/wcpncpy.c (__wcpncpy): Fix broken implementation to match stpncpy.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h74
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h2
3 files changed, 42 insertions, 38 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index cc9c94d..f3cd107 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -12,6 +12,10 @@
Likewise.
* sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
+ Likewise.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
+ Likewise.
* Makefile (tests): Add tst-sem8 and tst-sem9.
* tst-sem8.c: New file.
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index 8ac8416..4a392e8 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -148,34 +148,34 @@ typedef int lll_lock_t;
# endif
#define lll_futex_wait(futex, val) \
- do { \
- int __ignore; \
- register unsigned long __r3 asm ("r3") = SYS_futex; \
- register unsigned long __r4 asm ("r4") = (unsigned long) (futex); \
- register unsigned long __r5 asm ("r5") = FUTEX_WAIT; \
- register unsigned long __r6 asm ("r6") = (unsigned long) (val); \
- register unsigned long __r7 asm ("r7") = 0; \
- __asm __volatile (SYSCALL_WITH_INST_PAD \
- : "=z" (__ignore) \
- : "r" (__r3), "r" (__r4), "r" (__r5), \
- "r" (__r6), "r" (__r7) \
- : "memory", "t"); \
+ do { \
+ int __ignore; \
+ register unsigned long __r3 asm ("r3") = SYS_futex; \
+ register unsigned long __r4 asm ("r4") = (unsigned long) (futex); \
+ register unsigned long __r5 asm ("r5") = FUTEX_WAIT; \
+ register unsigned long __r6 asm ("r6") = (unsigned long) (val); \
+ register unsigned long __r7 asm ("r7") = 0; \
+ __asm __volatile (SYSCALL_WITH_INST_PAD \
+ : "=z" (__ignore) \
+ : "r" (__r3), "r" (__r4), "r" (__r5), \
+ "r" (__r6), "r" (__r7) \
+ : "memory", "t"); \
} while (0)
#define lll_futex_wake(futex, nr) \
- do { \
- int __ignore; \
- register unsigned long __r3 asm ("r3") = SYS_futex; \
- register unsigned long __r4 asm ("r4") = (unsigned long) (futex); \
- register unsigned long __r5 asm ("r5") = FUTEX_WAKE; \
- register unsigned long __r6 asm ("r6") = (unsigned long) (nr); \
- register unsigned long __r7 asm ("r7") = 0; \
- __asm __volatile (SYSCALL_WITH_INST_PAD \
- : "=z" (__ignore) \
- : "r" (__r3), "r" (__r4), "r" (__r5), \
- "r" (__r6), "r" (__r7) \
- : "memory", "t"); \
+ do { \
+ int __ignore; \
+ register unsigned long __r3 asm ("r3") = SYS_futex; \
+ register unsigned long __r4 asm ("r4") = (unsigned long) (futex); \
+ register unsigned long __r5 asm ("r5") = FUTEX_WAKE; \
+ register unsigned long __r6 asm ("r6") = (unsigned long) (nr); \
+ register unsigned long __r7 asm ("r7") = 0; \
+ __asm __volatile (SYSCALL_WITH_INST_PAD \
+ : "=z" (__ignore) \
+ : "r" (__r3), "r" (__r4), "r" (__r5), \
+ "r" (__r6), "r" (__r7) \
+ : "memory", "t"); \
} while (0)
@@ -252,24 +252,24 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
extern int __lll_wait_tid (int *tid) attribute_hidden;
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) *__tid = &(tid); \
- if (*__tid != 0) \
- __lll_wait_tid (__tid); \
+ do { \
+ __typeof (tid) *__tid = &(tid); \
+ if (*__tid != 0) \
+ __lll_wait_tid (__tid); \
} while (0)
extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
attribute_hidden;
#define lll_timedwait_tid(tid, abstime) \
- ({ \
- int __result = 0; \
- if (tid != 0) \
- { \
- if (abstime == NULL || abstime->tv_nsec >= 1000000000) \
- __result = EINVAL; \
- else \
- __result = __lll_timedwait_tid (&tid, abstime); \
- } \
+ ({ \
+ int __result = 0; \
+ if (tid != 0) \
+ { \
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) \
+ __result = EINVAL; \
+ else \
+ __result = __lll_timedwait_tid (&tid, abstime); \
+ } \
__result; })
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 136dc57..4dfbf4b 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -319,7 +319,7 @@ extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
int __result = 0; \
if (tid != 0) \
{ \
- if (abstime == NULL || abstime->tv_nsec >= 1000000000) \
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) \
__result = EINVAL; \
else \
__result = __lll_timedwait_tid (&tid, abstime); \