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: Memory barriers vs lock/unlock


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.


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