Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2007-10-12 04:58:05


Author: igaztanaga
Date: 2007-10-12 04:58:04 EDT (Fri, 12 Oct 2007)
New Revision: 39957
URL: http://svn.boost.org/trac/boost/changeset/39957

Log:
Corrected bug in atomic_dec32 for PPC
Text files modified:
   trunk/boost/interprocess/detail/atomic.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/interprocess/detail/atomic.hpp
==============================================================================
--- trunk/boost/interprocess/detail/atomic.hpp (original)
+++ trunk/boost/interprocess/detail/atomic.hpp 2007-10-12 04:58:04 EDT (Fri, 12 Oct 2007)
@@ -343,7 +343,7 @@
 //! "mem": pointer to the atomic value
 //! Returns false if the value becomes zero on decrement, otherwise true
 inline bool atomic_dec32(volatile boost::uint32_t *mem)
-{ return !(atomic_add32(mem, boost::uint32_t(-1u)) - 1u); }
+{ return 0 != (atomic_add32(mem, boost::uint32_t(-1u)) - 1u); }
 
 //! Atomically read an boost::uint32_t from memory
 inline boost::uint32_t atomic_read32(volatile boost::uint32_t *mem)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk