This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++] remove __compare_and_swap
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: [libstdc++] remove __compare_and_swap
- From: Nathan Myers <ncm at nospam dot cantrip dot org>
- Date: Fri, 5 Oct 2001 12:18:02 -0700
- References: <20011005144508.A4979@disaster.jaj.com>
- Reply-To: libstdc++ at gcc dot gnu dot org
On Fri, Oct 05, 2001 at 02:45:08PM -0400, Phil Edwards wrote:
>
> A couple weeks ago I proposed removing __compare_and_swap, an unused
> function from the CPU configuration headers that seems to confuse port
> maintainers:
>
> http://gcc.gnu.org/ml/libstdc++/2001-09/msg00069.html
I apologize for not responding to the previous message.
Compare-and-swap is an essential primitive to maintain linked data
structures thread-safely without using an enormously more expensive,
unportable, and otherwise problematical mutex.
We don't have much in the library yet for support of multithreaded
programs, but eliminating primitives that such support would need
seems like the wrong direction to go.
Nathan Myers
ncm at cantrip dot org