libstdc++/4367: Sparc atomicity.h routines can lock up on some OS.
Eric Norum
eric.norum@usask.ca
Tue Apr 2 09:57:00 GMT 2002
On Monday, April 1, 2002, at 08:56 PM, bkoz@gcc.gnu.org wrote:
> Synopsis: Sparc atomicity.h routines can lock up on some OS.
>
> State-Changed-From-To: open->analyzed
> State-Changed-By: bkoz
> State-Changed-When: Mon Apr 1 18:56:21 2002
> State-Changed-Why:
> I guess you'll have to use heavier-weight locks for these OS's. Can
> you think of another solution? I cannot.
>
> Note this is an issue with all the cpu/atomicity.h files, not just
> sparc, right?
>
>
No, it's not an issue for architectures which provide hardware support
for this operation. Some 68k family members have a `compare and set'
instruction, the 80x86 family has the lock prefix, etc. The sparc
routine appears to be the only one that uses a spin lock to protect the
operation and is thus the only code that is at risk in a
strict-preemptive OS environment. Even the sparc64 code has no spin
lock. I don't know enough about the sparc architecture to be able to
say if the any of the techniques used in the other source files could be
used to replace the existing sparc code.
--
Eric Norum <eric.norum@usask.ca>
Department of Electrical Engineering
University of Saskatchewan
Saskatoon, Canada.
Phone: (306) 966-5394 FAX: (306) 966-5407
More information about the Gcc-bugs
mailing list