This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: using atomic builtins
- From: "Peter Dimov" <pdimov at mmltd dot net>
- To: "Benjamin Kosnik" <bkoz at redhat dot com>, <libstdc++ at gcc dot gnu dot org>
- Cc: <rth at redhat dot com>, <phillip dot m dot jordan at gmail dot com>
- Date: Mon, 26 Jun 2006 21:40:27 +0300
- Subject: Re: using atomic builtins
- References: <20060626125850.5211561d.bkoz@redhat.com>
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.