Boost logo

Boost-Commit :

From: xushiweizh_at_[hidden]
Date: 2008-05-05 09:51:51


Author: xushiwei
Date: 2008-05-05 09:51:50 EDT (Mon, 05 May 2008)
New Revision: 45140
URL: http://svn.boost.org/trac/boost/changeset/45140

Log:
atomic: linux/gcc
Text files modified:
   sandbox/memory/boost/memory/winapi/atomic/atomic_builtins.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: sandbox/memory/boost/memory/winapi/atomic/atomic_builtins.hpp
==============================================================================
--- sandbox/memory/boost/memory/winapi/atomic/atomic_builtins.hpp (original)
+++ sandbox/memory/boost/memory/winapi/atomic/atomic_builtins.hpp 2008-05-05 09:51:50 EDT (Mon, 05 May 2008)
@@ -16,7 +16,7 @@
 
 __forceinline LONG WINAPI InterlockedIncrement(volatile LPLONG lpAddend)
 {
- return __sync_fetch_and_add(lpAddend, 1) + 1;
+ return __sync_add_and_fetch(lpAddend, 1);
 }
 
 __forceinline LONG WINAPI InterlockedDecrement(volatile LPLONG lpAddend)
@@ -47,7 +47,7 @@
 
 // -------------------------------------------------------------------------
 
-__forceinline PVOID WINAPI InterlockedCompareExchange(
+__forceinline LONG WINAPI InterlockedCompareExchange(
     volatile LPLONG Destination, LONG Exchange, LONG Comperand)
 {
         return __sync_val_compare_and_swap(Destination, Comperand, Exchange);


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