diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-06-01 18:14:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-06-01 18:14:07 +0000 |
commit | 016deb4c4fb9c52abe842bfc468af2ea38691dbc (patch) | |
tree | 9324385be04aa939183f339859dd40c226d3cf5a /nptl/sysdeps/unix/sysv/linux | |
parent | d3db7f92583a0075d71f638364b296addab35b89 (diff) | |
download | glibc-016deb4c4fb9c52abe842bfc468af2ea38691dbc.tar.gz glibc-016deb4c4fb9c52abe842bfc468af2ea38691dbc.tar.xz glibc-016deb4c4fb9c52abe842bfc468af2ea38691dbc.zip |
(__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S index c0fd1a99a8..305fa4d5d7 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S @@ -82,6 +82,7 @@ __pthread_cond_timedwait: addl $1, total_seq(%ebx) adcl $0, total_seq+4(%ebx) + addl $1, cond_futex(%ebx) #define FRAME_SIZE 24 subl $FRAME_SIZE, %esp @@ -148,6 +149,8 @@ __pthread_cond_timedwait: 21: movl %ecx, 4(%esp) movl %edx, 8(%esp) + movl cond_futex(%ebx), %edi + /* Unlock. */ LOCK #if cond_lock == 0 @@ -164,12 +167,12 @@ __pthread_cond_timedwait: leal 4(%esp), %esi xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */ movl %edi, %edx - addl $wakeup_seq, %ebx -.Ladd_wakeup: + addl $cond_futex, %ebx +.Ladd_cond_futex: movl $SYS_futex, %eax ENTER_KERNEL - subl $wakeup_seq, %ebx -.Lsub_wakeup: + subl $cond_futex, %ebx +.Lsub_cond_futex: movl %eax, %esi movl (%esp), %eax @@ -212,6 +215,7 @@ __pthread_cond_timedwait: addl $1, wakeup_seq(%ebx) adcl $0, wakeup_seq+4(%ebx) + addl $1, cond_futex(%ebx) movl $ETIMEDOUT, %esi jmp 14f @@ -359,7 +363,7 @@ __condvar_tw_cleanup3: .size __condvar_tw_cleanup3, .-__condvar_tw_cleanup3 .type __condvar_tw_cleanup2, @function __condvar_tw_cleanup2: - subl $wakeup_seq, %ebx + subl $cond_futex, %ebx .size __condvar_tw_cleanup2, .-__condvar_tw_cleanup2 .type __condvar_tw_cleanup, @function __condvar_tw_cleanup: @@ -384,12 +388,14 @@ __condvar_tw_cleanup: call __lll_mutex_lock_wait 1: movl broadcast_seq(%ebx), %eax - cmpl 12(%esp), %eax + cmpl 20(%esp), %eax jne 3f addl $1, wakeup_seq(%ebx) adcl $0, wakeup_seq+4(%ebx) + addl $1, cond_futex(%ebx) + addl $1, woken_seq(%ebx) adcl $0, woken_seq+4(%ebx) @@ -409,7 +415,7 @@ __condvar_tw_cleanup: call __lll_mutex_unlock_wake /* Wake up all waiters to make sure no signal gets lost. */ -2: addl $wakeup_seq, %ebx +2: addl $cond_futex, %ebx movl $FUTEX_WAKE, %ecx movl $SYS_futex, %eax movl $0x7fffffff, %edx @@ -435,7 +441,7 @@ __condvar_tw_cleanup: .uleb128 .Lcstend-.Lcstbegin .Lcstbegin: .long .LcleanupSTART-.LSTARTCODE - .long .Ladd_wakeup-.LcleanupSTART + .long .Ladd_cond_futex-.LcleanupSTART .long __condvar_tw_cleanup-.LSTARTCODE .uleb128 0 .long .LebxmovedUR-.LSTARTCODE @@ -443,15 +449,15 @@ __condvar_tw_cleanup: .long __condvar_tw_cleanup3-.LSTARTCODE .uleb128 0 .long .LebxmovedUR-.LSTARTCODE - .long .Ladd_wakeup-.LebxmovedUR + .long .Ladd_cond_futex-.LebxmovedUR .long __condvar_tw_cleanup-.LSTARTCODE .uleb128 0 - .long .Ladd_wakeup-.LSTARTCODE - .long .Lsub_wakeup-.Ladd_wakeup + .long .Ladd_cond_futex-.LSTARTCODE + .long .Lsub_cond_futex-.Ladd_cond_futex .long __condvar_tw_cleanup2-.LSTARTCODE .uleb128 0 - .long .Lsub_wakeup-.LSTARTCODE - .long .LcleanupEND-.Lsub_wakeup + .long .Lsub_cond_futex-.LSTARTCODE + .long .LcleanupEND-.Lsub_cond_futex .long __condvar_tw_cleanup-.LSTARTCODE .uleb128 0 .long .LcallUR-.LSTARTCODE |