diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-10-12 23:05:45 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-10-12 23:05:45 +0000 |
commit | fa3cbe3d5d0c6e6b4de642de8693f9f58347d18c (patch) | |
tree | b9a8b9759bffa3a9514409d3c7ca3bf462b41241 /nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S | |
parent | cc0af5f451b47358315c9c180b9bf908aed61b89 (diff) | |
download | glibc-fa3cbe3d5d0c6e6b4de642de8693f9f58347d18c.zip glibc-fa3cbe3d5d0c6e6b4de642de8693f9f58347d18c.tar.gz glibc-fa3cbe3d5d0c6e6b4de642de8693f9f58347d18c.tar.bz2 |
Update.
2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/syscalls.list: Add waitpid.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S index 06b0f62..a1967f4 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S @@ -40,22 +40,21 @@ __condvar_cleanup: mov.l @(4,r9), r8 /* Get internal lock. */ - mov #1, r3 + mov #0, r3 + mov #1, r4 #if cond_lock != 0 - XADD (r3, @(cond_lock,r8), r2) + CMPXCHG (r3, @(cond_lock,r8), r4, r2) #else - XADD (r3, @r8, r2) + CMPXCHG (r3, @r8, r4, r2) #endif - tst r2, r2 bt 1f mov r8, r5 #if cond_lock != 0 add #cond_lock, r5 #endif - mov r2, r4 mov.l .Lwait0, r1 bsrf r1 - nop + mov r2, r4 .Lwait0b: 1: mov #1, r2 @@ -144,13 +143,13 @@ __pthread_cond_wait: mov r5, r9 /* Get internal lock. */ - mov #1, r3 + mov #0, r3 + mov #1, r4 #if cond_lock != 0 - XADD (r3, @(cond_lock,r8), r2) + CMPXCHG (r3, @(cond_lock,r8), r4, r2) #else - XADD (r3, @r8, r2) + CMPXCHG (r3, @r8, r4, r2) #endif - tst r2, r2 bt 2f bra 1f nop @@ -241,13 +240,13 @@ __pthread_cond_wait: .Ldisable0b: /* Lock. */ - mov #1, r3 + mov #0, r3 + mov #1, r4 #if cond_lock != 0 - XADD (r3, @(cond_lock,r8), r2) + CMPXCHG (r3, @(cond_lock,r8), r4, r2) #else - XADD (r3, @r8, r2) + CMPXCHG (r3, @r8, r4, r2) #endif - tst r2, r2 bf 5f 6: mov.l @(woken_seq,r8), r0 |