using atomic builtins
Peter Dimov
pdimov@mmltd.net
Mon Jun 26 18:40:00 GMT 2006
Benjamin Kosnik wrote:
> Hey all!
>
> I've been reviewing some of the excellent work that Phillip is doing
> for summer of code.
>
> As part of that, I'm reviewing:
> http://mulliard.homelinux.org/~phillip/code/soc/patches/shared_ptr.patch
FWIW, the two
+#ifdef __GTHREADS
+ _GLIBCXX_READ_MEM_BARRIER;
+ _GLIBCXX_WRITE_MEM_BARRIER;
+#endif
blocks aren't necessary and can (should) be omitted, both because
add_ref_lock requires no memory synchronization, and because (IIRC) the
__sync_* functions already provide ordering.
More information about the Libstdc++
mailing list