This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2.25] powerpc: Fix adapt_count update in __lll_unlock_elision


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,

-- 
Tulio Magno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]