[parisc-linux] Re: [PATCH] HPPA Linuxthreads.
Grant Grundler
grundler@parisc-linux.org
Thu, 22 May 2003 09:15:52 -0600
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.
> Are you suggesting that it is prehaps fragile based on gcc's
> choice of optimization?
That's another issue. OTOH, I doubt gcc will ever mangle this
fairly short chunk of code. Maybe post the gcc asm output and
see if anyone can improve it.
grant