More on memory barriers

Benjamin Kosnik bkoz@redhat.com
Wed Sep 15 18:58:00 GMT 2004


>This also leads me to wonder if the libstdc++ atomicity.h ought to include
>memory barrier instructions on more targets, as they do on the alpha and
>PPC405 (though, oddly, not for other PPC targets; this seems rather
>fragile).  The ia64 __sync_* intrinsics also imply a full barrier.

I think primitives for read and write memory barriers should be added to
atomicity.h.

It's past time for C, C++, and java to all use the same code for this
stuff IMHO. Keeping three versions of this stuff in sync has proved to
be impossible.

-benjamin



More information about the Gcc mailing list