libstdc++/5198: 3.0.3 linux x m68k build fail: invalid opcodes in c++locale.cc
Werner Tuchan
tuwn@gmx.net
Mon Feb 4 03:23:00 GMT 2002
I think the solution for the 68000, 68010, cpu32 & 5400 CPUs useing the TAS
instruction is really dangerous since it may easily deadlock. A low priority
thread can enter the critical section and may be preempted by a high priorty
thread which enters the TAS loop and stays there forever consuming all CPU
cycles so that the low priorty thread has no chance to release the lock.
Therefore spinlock implementations usually disable preemption before trying
to acquire the lock. Actually busy loop spinlocks are only usefull on SMP
machines anyway. I would recommend that we disable interrupts for the latter
CPUs in addition to the TAS instruction.
-Werner
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=5198
More information about the Gcc-bugs
mailing list