[Bug libstdc++/51798] [4.7 regression] libstdc++ atomicity performance regression due to __sync_fetch_and_add
amacleod at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 25 16:09:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51798
--- Comment #9 from Andrew Macleod <amacleod at redhat dot com> 2012-01-25 15:36:23 UTC ---
(In reply to comment #8)
> > At least at this point I'd feel much safer if libstdc++ used just acq_rel
> > semantics for the all atomic_fetch_and_add places, instead of somewhere acq and
> > somewhere rel semantics.
>
> Can we at least apply the ACQ_REL patch using the new atomic intrinsics?
>
Well, I thought that was implicit since I wasn't suggesting we change the
__sync semantics, just the required libstdc++ bits.
All that has to be done is replace the two __sync_fetch_and_add(...) with
__atomic_fetch_add(.., __ATOMIC_ACQ_REL) in atomicity.h isn't it?
More information about the Gcc-bugs
mailing list