diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-06 08:38:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-06 08:38:56 +0000 |
commit | 11090a992df365ac6b107027f2c932028172dcbf (patch) | |
tree | 55c0fbdd46957216487f59f5233901e7ccd5a8c6 /nptl | |
parent | 432cf458f981cb1e9c9051cc39217fc7773f45dd (diff) | |
download | glibc-11090a992df365ac6b107027f2c932028172dcbf.tar.gz glibc-11090a992df365ac6b107027f2c932028172dcbf.tar.xz glibc-11090a992df365ac6b107027f2c932028172dcbf.zip |
Update.
2003-02-06 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong but inactive generalization. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. Minor optimization, remove one instruction. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
Diffstat (limited to 'nptl')
5 files changed, 23 insertions, 45 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 40f2dd5254..997fbbff7e 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,12 @@ +2003-02-06 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong + but inactive generalization. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise. + Minor optimization, remove one instruction. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise. + 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters. diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S index 90d2d3ba90..81a4623a9c 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S @@ -44,9 +44,6 @@ __pthread_cond_broadcast: pushl %ebx movl 12(%esp), %ebx -#if cond_lock != 0 - addl $cond_lock, %ebx -#endif /* Get internal lock. */ movl $1, %eax @@ -72,22 +69,16 @@ __pthread_cond_broadcast: movl %eax, wakeup_seq+4(%ebx) /* Wake up all threads. */ - addl $wakeup_seq-cond_lock, %ebx + addl $wakeup_seq, %ebx movl $FUTEX_WAKE, %ecx xorl %esi, %esi movl $SYS_futex, %eax movl $0x7fffffff, %edx ENTER_KERNEL - subl $wakeup_seq-cond_lock, %ebx - /* Unlock. */ 4: LOCK -#if cond_lock == 0 - decl (%ebx) -#else - decl cond_lock(%ebx) -#endif + decl cond_lock-wakeup_seq(%ebx) jne 5f 6: xorl %eax, %eax @@ -107,11 +98,7 @@ __pthread_cond_broadcast: /* Unlock in loop requires waekup. */ 5: -#if cond_lock == 0 - movl %ebx, %eax -#else - leal cond_lock(%ebx), %eax -#endif + leal cond_lock-wakeup_seq(%ebx), %eax call __lll_mutex_unlock_wake jmp 6b .size __pthread_cond_broadcast, .-__pthread_cond_broadcast diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S index 5067345b72..a581c127b2 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S @@ -42,9 +42,6 @@ __pthread_cond_signal: pushl %esi pushl %ebx -#if cond_lock != 0 - addl $cond_lock, %ebx -#endif movl 12(%esp), %ebx @@ -72,22 +69,16 @@ __pthread_cond_signal: adcl $0, wakeup_seq+4(%ebx) /* Wake up one thread. */ - addl $wakeup_seq-cond_lock, %ebx + addl $wakeup_seq, %ebx movl $FUTEX_WAKE, %ecx xorl %esi, %esi movl $SYS_futex, %eax movl %ecx, %edx /* movl $1, %edx */ ENTER_KERNEL - subl $wakeup_seq-cond_lock, %ebx - /* Unlock. */ 4: LOCK -#if cond_lock == 0 - decl (%ebx) -#else - decl cond_lock(%ebx) -#endif + decl cond_lock-wakeup_seq(%ebx) jne 5f 6: xorl %eax, %eax @@ -107,11 +98,7 @@ __pthread_cond_signal: /* Unlock in loop requires waekup. */ 5: -#if cond_lock == 0 - movl %ebx, %eax -#else - leal cond_lock(%ebx), %eax -#endif + leal cond_lock-wakeup_seq(%ebx), %eax call __lll_mutex_unlock_wake jmp 6b .size __pthread_cond_signal, .-__pthread_cond_signal 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 7b8ec9328f..c520f287d9 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 @@ -51,9 +51,6 @@ __pthread_cond_timedwait: movl 20(%esp), %ebx movl 28(%esp), %ebp -#if cond_lock != 0 - addl $cond_lock, %ebx -#endif /* Get internal lock. */ movl $1, %eax @@ -134,10 +131,10 @@ __pthread_cond_timedwait: leal 4(%esp), %esi xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */ movl %edi, %edx - addl $wakeup_seq-cond_lock, %ebx + addl $wakeup_seq, %ebx movl $SYS_futex, %eax ENTER_KERNEL - subl $wakeup_seq-cond_lock, %ebx + subl $wakeup_seq, %ebx movl %eax, %esi call __pthread_disable_asynccancel 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 438fcca6a4..e43bcbac82 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 @@ -41,9 +41,6 @@ __condvar_cleanup: pushl %ebx movl 8(%esp), %ebx -#if cond_lock != 0 - addl $cond_lock, %ebx -#endif /* Get internal lock. */ movl $1, %eax @@ -70,7 +67,11 @@ __condvar_cleanup: adcl $0, woken_seq+4(%ebx) LOCK +#if cond_lock == 0 decl (%ebx) +#else + decl cond_lock(%ebx) +#endif je 2f #if cond_lock == 0 movl %ebx, %eax @@ -96,9 +97,6 @@ __pthread_cond_wait: xorl %esi, %esi movl 16(%esp), %ebx -#if cond_lock != 0 - addl $cond_lock, %ebx -#endif /* Get internal lock. */ movl $1, %eax @@ -153,10 +151,10 @@ __pthread_cond_wait: movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */ movl %edi, %edx - addl $wakeup_seq-cond_lock, %ebx + addl $wakeup_seq, %ebx movl $SYS_futex, %eax ENTER_KERNEL - subl $wakeup_seq-cond_lock, %ebx + subl $wakeup_seq, %ebx call __pthread_disable_asynccancel |