This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [parisc-linux] Re: [PATCH] HPPA Linuxthreads.
- From: Grant Grundler <grundler at parisc-linux dot org>
- To: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- Cc: Ulrich Drepper <drepper at redhat dot com>,libc-alpha at sources dot redhat dot com, parisc-linux at lists dot parisc-linux dot org,Randolph Chung <tausq at debian dot org>,John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
- Date: Thu, 22 May 2003 09:15:52 -0600
- Subject: Re: [parisc-linux] Re: [PATCH] HPPA Linuxthreads.
- References: <20030521172929.GB21858@systemhalted> <3ECBBE25.8090302@redhat.com> <20030522150902.GM21858@systemhalted>
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