This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]