This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Make std::tr1::shared_ptr thread-safe.
- From: Alexander Terekhov <alexander dot terekhov at gmail dot com>
- To: Peter Dimov <pdimov at mmltd dot net>
- Cc: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 29 Mar 2005 17:37:21 +0200
- Subject: Re: [patch] Make std::tr1::shared_ptr thread-safe.
- References: <OF51216141.374EAC91-ONC1256FD3.00537529-C1256FD3.005361E0@de.ibm.com>
- Reply-to: Alexander Terekhov <alexander dot terekhov at gmail dot com>
[... __release/acquire_memory_barrier() ...]
> The only reliable implementation of these barriers that I see
> is an empty pthread_mutex_lock/pthread_mutex_unlock pair.
Nope. That won't work. It just proves once again that non-label
notation for acquire/release (and others more relaxed
unidirectional) constraints sucks miserably. It's akin to
abuse of pthread_barrier_wait().
http://www.opengroup.org/austin/mailarchives/ag/msg07595.html
http://www.opengroup.org/austin/mailarchives/ag/msg07604.html
http://www.opengroup.org/austin/mailarchives/ag/msg07593.html
Hth.
regards,
alexander.