diff options
author | Guo Yixuan <culu.gyx@gmail.com> | 2014-06-03 16:19:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-03 17:59:10 -0700 |
commit | 344e61df0200af758e794b9843ffb37bd89e5259 (patch) | |
tree | e130289cf9015d25bf414029574e9f2e414bf5cb /nptl/sysdeps | |
parent | 690bb11f6080800be584d5db7b0b0ff61253c461 (diff) | |
download | glibc-344e61df0200af758e794b9843ffb37bd89e5259.tar.gz glibc-344e61df0200af758e794b9843ffb37bd89e5259.tar.xz glibc-344e61df0200af758e794b9843ffb37bd89e5259.zip |
Fixed pthread_spin_lock on sparc32/64 (bug 16882)
[BZ #16882] * nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S (pthread_spin_lock): Branch out of spin loop to proper location. * nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S (pthread_spin_lock): Likewise. * nptl/tst-spin4.c: New test. * nptl/Makefile (tests): Add tst-spin4.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S | 4 | ||||
-rw-r--r-- | nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S b/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S index ea863d7e34..3accc69615 100644 --- a/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S +++ b/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S @@ -19,11 +19,11 @@ .text ENTRY(pthread_spin_lock) - ldstub [%o0], %g1 +1: ldstub [%o0], %g1 orcc %g1, 0x0, %g0 bne,a 2f ldub [%o0], %g1 -1: retl + retl mov 0, %o0 2: orcc %g1, 0x0, %g0 bne,a 2b diff --git a/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S b/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S index 0f849b2c5d..aec66542de 100644 --- a/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S +++ b/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S @@ -19,10 +19,10 @@ .text ENTRY(pthread_spin_lock) - ldstub [%o0], %g1 +1: ldstub [%o0], %g1 brnz,pn %g1, 2f membar #StoreLoad | #StoreStore -1: retl + retl mov 0, %o0 2: ldub [%o0], %g1 brnz,pt %g1, 2b |