powerpc pthread_once bug fix
Ryan S. Arnold
ryan.arnold@gmail.com
Tue Sep 25 21:52:00 GMT 2012
On Tue, Sep 25, 2012 at 4:08 PM, Ryan S. Arnold <ryan.arnold@gmail.com> wrote:
> On Thu, Aug 30, 2012 at 11:42 PM, Jeff Law <law@redhat.com> wrote:
>> 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.
>
> I re-tested the patch with the modified constraint and it now passes
> make check (whereas it used to hang in some tests).
>
> I'll commit the patch shortly.
Pushed upstream with git commit 7e2fca8dd22e3bd932581d6479b0c552deff00b6
Ryan S. Arnold
More information about the Libc-alpha
mailing list