This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Fw: [patch] Make std::tr1::shared_ptr thread-safe.
- From: Alexander Terekhov <alexander dot terekhov at gmail dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Peter Dimov <pdimov at mmltd dot net>, libstdc++ at gcc dot gnu dot org
- Date: Fri, 1 Apr 2005 16:42:55 +0200
- Subject: Re: Fw: [patch] Make std::tr1::shared_ptr thread-safe.
- References: <OF24DE43AB.98214558-ONC1256FD5.0044D61E-C1256FD5.0044BD18@de.ibm.com> <e52efbe105033105212ee0988a@mail.gmail.com> <424D5134.3090108@suse.de>
- Reply-to: Alexander Terekhov <alexander dot terekhov at gmail dot com>
On Apr 1, 2005 3:48 PM, Paolo Carlini <pcarlini@suse.de> wrote:
[...]
> I'm trying to understand the basic implications of your interesting
> analyses.
It is about msync semantics of exchange_and_add(). If you rely on
msync semantics which it doesn't provide, your code is broken. If it
is guaranteed to provide "fully-fenced" semantics (mimicking Intel's
__sync_fetch_and_add()), then (apart from unneeded overhead) you're
fine.
regards,
alexander.