This is the mail archive of the
mailing list for the glibc project.
Re: [parisc-linux] Re: [PATCH] HPPA Linuxthreads.
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: grundler at parisc-linux dot org (Grant Grundler)
- Cc: carlos at baldric dot uwo dot ca, drepper at redhat dot com, libc-alpha at sources dot redhat dot com, parisc-linux at lists dot parisc-linux dot org, tausq at debian dot org, dave dot anglin at nrc-cnrc dot gc dot ca
- Date: Thu, 22 May 2003 11:53:44 -0400 (EDT)
- Subject: Re: [parisc-linux] Re: [PATCH] HPPA Linuxthreads.
> On Thu, May 22, 2003 at 11:09:02AM -0400, Carlos O'Donell wrote:
> > > > + while (__ldcw (addr) == 0)
> > > > + while (*addr == 0) ;
> > >
> > > This is plain wrong. addr at least must be volatile.
> > __ldcw is volatile.
> yes, but *addr can be optimized out of the while loop.
Yes, you are correct. This is the code from the inner loop:
1c: 0f 40 10 93 ldw 0(,r26),r19
20: 86 60 3f f5 cmpib,= 0,r19,20 <__pthread_spin_lock+0x20>
24: 08 00 02 40 nop
Don't know how I missied that :(
J. David Anglin email@example.com
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)