activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1311094 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp
Date Sun, 08 Apr 2012 20:42:21 GMT
Author: tabish
Date: Sun Apr  8 20:42:21 2012
New Revision: 1311094

URL: http://svn.apache.org/viewvc?rev=1311094&view=rev
Log:
Windows Atomic getAndIncrement method was not returning the correct value.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp?rev=1311094&r1=1311093&r2=1311094&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp
Sun Apr  8 20:42:21 2012
@@ -51,7 +51,7 @@ void* Atomics::getAndSet(volatile void**
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::getAndIncrement(volatile int* target) {
-	return ::InterlockedIncrement((volatile LONG*)target);
+	return ::InterlockedIncrement((volatile LONG*)target) - 1;
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message