Update of /cvsroot/boost/boost/boost/interprocess/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22745/detail

Modified Files:
        atomic.hpp 
Log Message:
Fixed bug in atomic_dec32 for intel. Thanks to Harold Pirtle!

Index: atomic.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/detail/atomic.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- atomic.hpp  17 Dec 2006 01:22:52 -0000      1.2
+++ atomic.hpp  17 Feb 2007 11:39:41 -0000      1.3
@@ -89,15 +89,15 @@
 
 inline boost::uint32_t atomic_dec32(volatile boost::uint32_t *mem)
 {
-   boost::uint32_t prev;
+  boost::uint32_t prev;
 
-   // acts like an atomic 'return (*mem)--;'
-   asm volatile ("movl $-1, %0;\n\t"
-                 "lock; xaddl %0, %1"
-                 : "=r" (prev)
-                 : "m" (*(mem))
-                 : "memory", "cc" );
-   return prev;
+  // acts like an atomic 'return (*mem)--;'
+  asm volatile ("movl $-1, %0;\n\t"
+                "lock; xaddl %0, %1"
+                : "=r" (prev)                //outputs
+                :  "m" (*(mem)),"0" (prev)        //inputs
+                : "memory", "cc" );
+  return prev; 
 }
 
 inline boost::uint32_t atomic_read32(volatile boost::uint32_t *mem)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to