From eb1321f291515dae75c83a40c39e775fdd38e97a Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 20 Jan 2017 16:32:29 -0200 Subject: 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. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/powerpc/elision-unlock.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9573c5c..d90569f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-01-20 Tulio Magno Quites Machado Filho + + * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c + (__lll_unlock_elision): Fix adapt_count decrement. + 2017-01-14 Martin Galvan * README.pretty-printers (Known issues): Warn about printers not diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c index 759c146..e3fe58e 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); } -- cgit v1.1