This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5198: 3.0.3 linux x m68k build fail: invalid opcodes in c++locale.cc
- From: "Werner Tuchan" <tuwn at gmx dot net>
- To: "Aaron J. Grier" <aaron at frye dot com>
- Cc: <gcc-gnats at gcc dot gnu dot org>,<gcc-prs at gcc dot gnu dot org>,<gcc-bugs at gcc dot gnu dot org>,<aaron at frye dot com>,<miod at openbsd dot org>,<jj at openbsd dot org>,<espie at openbsd dot org>
- Date: Tue, 5 Feb 2002 14:24:57 +0100
- Subject: Re: libstdc++/5198: 3.0.3 linux x m68k build fail: invalid opcodes in c++locale.cc
- References: <005601c1ad66$9cf9ca90$9e3d14ac@softron.de> <20020204143506.Y8141@aaron.internal>
> if we are turning off interrupts for the whole operation, and nobody
> else can get into __exchange_and_add without turning off interrupts,
> then why bother with the TAS at all?
>
> there's got to be an elegant solution somewhere. :)
>
TAS is only needed for multiprocessor spinlocks. A second processor could
concurrently enter even with interrupts disabled. This is the only reason
why TAS exists at all otherwise you could just use BSET. TAS is atomic even
on MP machines. Yet it is pretty unlikely that you find any multiprocessor
machines with these CPUs nowadays.
-Werner