diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-10-25 17:18:12 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-10-25 17:18:12 +0000 |
commit | d9732ccbecc3dd820e2f6496e792f5e839208312 (patch) | |
tree | b8f21a4f63875068370dbc498c5e7919a7a6ca3e /libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | |
parent | 12348b1583437f6382553bde4a32c2615216fec6 (diff) | |
download | eglibc2-d9732ccbecc3dd820e2f6496e792f5e839208312.tar.gz |
Merge changes between r21108 and r21352 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@21353 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S')
-rw-r--r-- | libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S index 6761c136e..6011f69f1 100644 --- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S @@ -649,10 +649,27 @@ __condvar_tw_cleanup: movl $0x7fffffff, %edx ENTER_KERNEL + /* Lock the mutex only if we don't own it already. This only happens + in case of PI mutexes, if we got cancelled after a successful + return of the futex syscall and before disabling async + cancellation. */ 5: movl 24+FRAME_SIZE(%esp), %eax - call __pthread_mutex_cond_lock + movl MUTEX_KIND(%eax), %ebx + andl $(ROBUST_BIT|PI_BIT), %ebx + cmpl $PI_BIT, %ebx + jne 8f + + movl (%eax), %ebx + andl $TID_MASK, %ebx + cmpl %ebx, %gs:TID + jne 8f + /* We managed to get the lock. Fix it up before returning. */ + call __pthread_mutex_cond_lock_adjust + jmp 9f + +8: call __pthread_mutex_cond_lock - movl %esi, (%esp) +9: movl %esi, (%esp) .LcallUR: call _Unwind_Resume hlt |