about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-01-20 16:32:29 -0200
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-01-20 16:40:30 -0200
commiteb1321f291515dae75c83a40c39e775fdd38e97a (patch)
tree900ea9a75d2f96d7756b8b3cc09647bd8413a89b /sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
parent6d523660e9f9f18e6c497d2d882c644e9c1b1c29 (diff)
downloadglibc-eb1321f291515dae75c83a40c39e775fdd38e97a.tar.gz
glibc-eb1321f291515dae75c83a40c39e775fdd38e97a.tar.xz
glibc-eb1321f291515dae75c83a40c39e775fdd38e97a.zip
powerpc: Fix adapt_count update in __lll_unlock_elision
Commit e9a96ea1aca4ebaa7c86e8b83b766f118d689d0f had an error that
prevents adapt_count from being updated in __lll_unlock_elision.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/elision-unlock.c')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/elision-unlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
index 759c1464a7..e3fe58e3f1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
+++ b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
@@ -35,7 +35,7 @@ __lll_unlock_elision (int *lock, short *adapt_count, int pshared)
 	 the mutex destruction requirements.  */
       short __tmp = atomic_load_relaxed (adapt_count);
       if (__tmp > 0)
-	atomic_store_relaxed (adapt_count, __tmp--);
+	atomic_store_relaxed (adapt_count, __tmp - 1);
 
       lll_unlock ((*lock), pshared);
     }