powerpc pthread_once bug fix

Jeff Law law@redhat.com
Fri Aug 31 04:43:00 GMT 2012


On 08/30/2012 05:20 PM, Alan Modra wrote:
> On Fri, Aug 31, 2012 at 08:29:01AM +0930, Alan Modra wrote:
>> I wrote this code in the first instance using atomic_read_barrier
>> followed by atomic_increment..  The reason why I implemented the patch
>> as I did, is that the asm allows MUTEX_HINT_REL on lwarx.  Otherwise
>> the asm is identical to atomic_read_barrier followed by
>> atomic_increment.  Please look at the generated object code to verify
>> this is so (or to refute my claim and hopefully find why things are
>> going wrong).  Is UP defined for your builds?
>
> Sigh.  I see the error.  "=&r" (tmp) needs to be "=&b" (tmp), because
> "addi 0,0,1" is really "li 0,1".
Build looks good.  The testcase which had me looking at this issue is 
also looking good -- certianly far more iterations without tripping any 
problems than it's done before.

Having looked at the patch fairly closely, I think it ought to go in 
once the constraint think is fixed.

jeff



More information about the Libc-alpha mailing list