This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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: libstdc++/5198: 3.0.3 linux x m68k build fail: invalid opcodes in c++locale.cc


> 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




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