Memory barriers vs lock/unlock
Paolo Carlini
pcarlini@suse.de
Tue Nov 8 21:06:00 GMT 2005
Peter Dimov wrote:
> When __exchange_and_add is implemented in terms of
> __sync_fetch_and_add, which seems to guarantee full ordering, there'll
> be no need for lock+unlock or explicit barriers.
Thanks a lot Peter, in particular for this last help! You know, we are
already using that implementation for quite a few targets (alpha, ia64,
powerpc, s390), very soon even inlined (see the last entries in the
audit trail of 24692) and we can easily implement this tweak in such cases.
Paolo.
More information about the Libstdc++
mailing list