diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-09-21 07:40:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-09-21 07:40:24 +0000 |
commit | 71451de2f1245b21ce3ba407068c453a866c03d6 (patch) | |
tree | 6646149e32cd4e762f758fa4796a62aab0ea8adf /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | |
parent | 56a4aa9886dc1145f8feac66b66216a44cb092c1 (diff) | |
download | glibc-71451de2f1245b21ce3ba407068c453a866c03d6.tar.gz glibc-71451de2f1245b21ce3ba407068c453a866c03d6.tar.xz glibc-71451de2f1245b21ce3ba407068c453a866c03d6.zip |
Update.
2003-09-21 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the locking macros. No distinction between normal and mutex locking anymore. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex locking. Merge bits from lowlevelmutex.S we still need. * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed. * Makefile (routines): Remove libc-lowlevelmutex. (libpthread-rountines): Remove lowlevelmutex. * pthread_barrier_wait.S: Adjust for new mutex implementation. * pthread_cond_broadcast.S: Likewise. * pthread_cond_timedwait.S: Likewise. * pthread_cond_wait.S: Likewise. * pthread_rwlock_rdlock.S: Likewise. * pthread_rwlock_timedrdlock.S: Likewise. * pthread_rwlock_timedwrlock.S: Likewise. * pthread_rwlock_unlock.S: Likewise. * pthread_rwlock_wrlock.S: Likewise. * pthread_cond_signal.S: Likewise. Don't use requeue.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S index 1680b3d859..db0428f527 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S @@ -53,12 +53,13 @@ __pthread_cond_wait: movl 16(%esp), %ebx /* Get internal lock. */ - movl $1, %eax + movl $1, %edx + xorl %eax, %eax LOCK #if cond_lock == 0 - xaddl %eax, (%ebx) + cmpxchgl %edx, (%ebx) #else - xaddl %eax, cond_lock(%ebx) + cmpxchgl %edx, cond_lock(%ebx) #endif testl %eax, %eax jne 1f @@ -114,12 +115,13 @@ __pthread_cond_wait: .LcleanupEND: /* Lock. */ - movl $1, %eax + movl $1, %edx + xorl %eax, %eax LOCK #if cond_lock == 0 - xaddl %eax, (%ebx) + cmpxchgl %edx, (%ebx) #else - xaddl %eax, cond_lock(%ebx) + cmpxchgl %edx, cond_lock(%ebx) #endif testl %eax, %eax jne 5f @@ -246,12 +248,13 @@ __condvar_w_cleanup: movl %eax, %esi /* Get internal lock. */ - movl $1, %eax + movl $1, %edx + xorl %eax, %eax LOCK #if cond_lock == 0 - xaddl %eax, (%ebx) + cmpxchgl %edx, (%ebx) #else - xaddl %eax, cond_lock(%ebx) + cmpxchgl %edx, cond_lock(%ebx) #endif testl %eax, %eax je 1f @@ -270,7 +273,11 @@ __condvar_w_cleanup: adcl $0, woken_seq+4(%ebx) LOCK +#if cond_lock == 0 + subl $1, (%ebx) +#else subl $1, cond_lock(%ebx) +#endif je 2f #if cond_lock == 0 |