Message ID | 1484572924-6897-1-git-send-email-tuliom@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On 16/01/2017 11:22, Tulio Magno Quites Machado Filho wrote: > Thanks for catching this. > > --- 8< --- > > Commit e9a96ea1aca4ebaa7c86e8b83b766f118d689d0f had an error that > prevents adapt_count from being updated in __lll_unlock_elision. > > 2017-01-16 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> > > * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c > (__lll_unlock_elision): Fix adapt_count decrement. > --- > sysdeps/unix/sysv/linux/powerpc/elision-unlock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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); > } > LGTM.
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes: > On 16/01/2017 11:22, Tulio Magno Quites Machado Filho wrote: >> Commit e9a96ea1aca4ebaa7c86e8b83b766f118d689d0f had an error that >> prevents adapt_count from being updated in __lll_unlock_elision. >> >> 2017-01-16 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> >> >> * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c >> (__lll_unlock_elision): Fix adapt_count decrement. >> --- >> sysdeps/unix/sysv/linux/powerpc/elision-unlock.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> 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); >> } >> > > LGTM. Pushed as eb1321f2. Thanks,
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); }