This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using atomic builtins


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]