This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/4367: Sparc atomicity.h routines can lock up on some OS.
- From: Richard Henderson <rth at redhat dot com>
- To: bkoz at gcc dot gnu dot org, eric dot norum at usask dot ca, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Tue, 2 Apr 2002 00:08:05 -0800
- Subject: Re: libstdc++/4367: Sparc atomicity.h routines can lock up on some OS.
- References: <20020402025622.11533.qmail@sources.redhat.com>
On Tue, Apr 02, 2002 at 02:56:22AM -0000, bkoz@gcc.gnu.org wrote:
> I guess you'll have to use heavier-weight locks for these OS's.
> Can you think of another solution? I cannot.
Generally for these targets you turn off interrupts. See
the m68k atomicity.h, for instance.
> Note this is an issue with all the cpu/atomicity.h files,
> not just sparc, right?
No, only those cpu's that have to use spinlocks instead of
e.g. an atomic-add, compare-and-exchange, or load-locked
instruction.
Of those listed in config/*, Sparc v7/v8, m68000, MIPS I,
and PA are affected.
MIPS I is an odd-ball because some operating systems (eg Linux)
provide emulation for the MIPS II ll/sc instructions. Currently
our atomicity.h file assumes MIPS II.
r~