activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1369238 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/Atomics.cpp
Date Fri, 03 Aug 2012 22:39:59 GMT
Author: tabish
Date: Fri Aug  3 22:39:58 2012
New Revision: 1369238

URL: http://svn.apache.org/viewvc?rev=1369238&view=rev
Log:
fix incrementAndGet on windows

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=1369238&r1=1369237&r2=1369238&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
Fri Aug  3 22:39:58 2012
@@ -31,51 +31,51 @@ void Atomics::shutdown() {
 
 ////////////////////////////////////////////////////////////////////////////////
 bool Atomics::compareAndSet32(volatile int* target, int expect, int update ) {
-	return ::InterlockedCompareExchange((volatile LONG*)target, update, expect) == (unsigned
int)expect;
+    return ::InterlockedCompareExchange((volatile LONG*)target, update, expect) == (unsigned
int)expect;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 bool Atomics::compareAndSet(volatile void** target, void* expect, void* update) {
-	return ::InterlockedCompareExchangePointer((volatile PVOID*)target, (void*)update, (void*)expect
) == (void*)expect;
+    return ::InterlockedCompareExchangePointer((volatile PVOID*)target, (void*)update, (void*)expect
) == (void*)expect;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::getAndSet(volatile int* target, int newValue) {
-	return ::InterlockedExchange((volatile LONG*)target, newValue);
+    return ::InterlockedExchange((volatile LONG*)target, newValue);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void* Atomics::getAndSet(volatile void** target, void* newValue) {
-	return InterlockedExchangePointer((volatile PVOID*)target, newValue);
+    return InterlockedExchangePointer((volatile PVOID*)target, newValue);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::getAndIncrement(volatile int* target) {
-	return ::InterlockedIncrement((volatile LONG*)target) - 1;
+    return ::InterlockedIncrement((volatile LONG*)target) - 1;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::getAndDecrement(volatile int* target) {
-	return ::InterlockedExchangeAdd((volatile LONG*)target, 0xFFFFFFFF);
+    return ::InterlockedExchangeAdd((volatile LONG*)target, 0xFFFFFFFF);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::getAndAdd(volatile int* target, int delta) {
-	return ::InterlockedExchangeAdd((volatile LONG*)target, delta);
+    return ::InterlockedExchangeAdd((volatile LONG*)target, delta);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::addAndGet(volatile int* target, int delta) {
-	return ::InterlockedExchangeAdd((volatile LONG*)target, delta) + delta;
+    return ::InterlockedExchangeAdd((volatile LONG*)target, delta) + delta;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::incrementAndGet(volatile int* target) {
-	return ::InterlockedIncrement((volatile LONG*)target) + 1;
+    return ::InterlockedIncrement((volatile LONG*)target);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 int Atomics::decrementAndGet(volatile int* target) {
-	return ::InterlockedExchangeAdd((volatile LONG*)target, 0xFFFFFFFF) - 1;
+    return ::InterlockedExchangeAdd((volatile LONG*)target, 0xFFFFFFFF) - 1;
 }
 



Mime
View raw message