aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-18 18:56:16 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-18 18:56:16 +0000
commit24a49f38ad4f05aca5d4b55b2bc1ac31347342ce (patch)
tree4ea12aecc7307ff8f68b04002196da07928b0300 /nptl/sysdeps/unix/sysv/linux/x86_64
parentd5cb838958b610de0bef12722860030eec964aaf (diff)
downloadglibc-24a49f38ad4f05aca5d4b55b2bc1ac31347342ce.tar
glibc-24a49f38ad4f05aca5d4b55b2bc1ac31347342ce.tar.gz
glibc-24a49f38ad4f05aca5d4b55b2bc1ac31347342ce.tar.bz2
glibc-24a49f38ad4f05aca5d4b55b2bc1ac31347342ce.zip
Update.
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthrad_cond_t): Replace __unused field with __clock. * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before waken all waiters in cleanup handler. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S17
2 files changed, 9 insertions, 10 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 67ef324831..3b717a2ead 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -74,7 +74,7 @@ typedef union
struct
{
int __lock;
- int __unused;
+ int __clock;
unsigned long long int __total_seq;
unsigned long long int __wakeup_seq;
unsigned long long int __woken_seq;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index 835486a8a1..652ddca772 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -65,14 +65,6 @@ __condvar_cleanup:
incq woken_seq(%rdi)
- /* Wake up all waiters to make sure no signal gets lost. */
- addq $wakeup_seq, %rdi
- movq $FUTEX_WAKE, %rsi
- movl $0x7fffffff, %edx
- movq $SYS_futex, %rax
- syscall
- subq $wakeup_seq, %rdi
-
LOCK
#if cond_lock == 0
decl (%rdi)
@@ -85,8 +77,15 @@ __condvar_cleanup:
#endif
callq __lll_mutex_unlock_wake
+ /* Wake up all waiters to make sure no signal gets lost. */
+2: addq $wakeup_seq, %rdi
+ movq $FUTEX_WAKE, %rsi
+ movl $0x7fffffff, %edx
+ movq $SYS_futex, %rax
+ syscall
+
/* Lock the mutex unless asynchronous cancellation is in effect. */
-2: testq $2, (%r8)
+ testq $2, (%r8)
jne 3f
movq 16(%r8), %rdi