[PATCH][BZ 18743] PowerPC: Fix a race condition when eliding a lock

Torvald Riegel triegel@redhat.com
Mon Aug 3 16:26:00 GMT 2015


On Sat, 2015-08-01 at 09:23 -0300, Adhemerval Zanella wrote:
> 
> 
> 
> > Em 31/07/2015, às 20:05, Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> escreveu:
> > 
> > Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> > 
> >> Mainly because I see this issue is not powerpc specific and I think we should
> >> also fix for x86 (that currently also uses the same mechanism) and for future
> >> arches that also might potentially implement lock elision using this.
> > 
> > AFAICS, this is powerpc specific.  x86 ensures the memory access happens
> > inside the transaction.
> > 
> > Here is the x86 implementation:
> > 
> 
> Right, x86 is evaluated as a macro. Indeed your initial approach seems to be better indeed. Thanks for catching it. I would suggest add a comment similar to x86 as well.
> 
> >  50 /* is_lock_free must be executed inside the transaction */
> >  51 

I think "evaluated" is better in this case.



More information about the Libc-alpha mailing list