This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Thread starvation and resource saturation in atomicity functions?
- From: Ian Lance Taylor <iant at google dot com>
- To: "Chad Attermann" <chad at broadmind dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 31 Mar 2008 22:56:15 -0700
- Subject: Re: Thread starvation and resource saturation in atomicity functions?
- References: <21f801c89360$65975860$c4ca46a6@office> <m3wsniog31.fsf@google.com> <000701c893b7$09c89e20$c4ca46a6@office>
"Chad Attermann" <chad@broadmind.com> writes:
> I can not confirm that it was the i386 code included in the gcc build
> but it appears that way from the signature. Is this perhaps a problem
> with the way that gcc 3.4.3 shipping with Solaris 10 x86 was built?
> Should it have opted for the i486 version instead that does not use
> spin-locks?
Yes, barring the extremely unlikely case that you need to run a plain
i386, you should use the i486 code from libstdc++-v3/config/cpu/i486.
There are various difficulties with the i386 atomicity code.
Fortunately the i486 was released almost 20 years ago, and it's
generally safe to use the i486 instructions today.
Ian