summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-26 21:13:05 +0000
committerAlan Conway <aconway@apache.org>2008-11-26 21:13:05 +0000
commita2917ca1aabd64e4f6e1667b8e52145d9752d0e0 (patch)
tree2292126635ef5673798a57fcef8f5d7bab657a1c /cpp/src/qpid/sys
parentbb68e723af7401a05f2f103d441acfd655254b31 (diff)
downloadqpid-python-a2917ca1aabd64e4f6e1667b8e52145d9752d0e0.tar.gz
Was causing cluster failures.
QPID-1488 Mick Goulish: QueuePolicy serialization fix for cluster braindump. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/AtomicValue_mutex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/AtomicValue_mutex.h b/cpp/src/qpid/sys/AtomicValue_mutex.h
index 8871addbda..e4d433e7f5 100644
--- a/cpp/src/qpid/sys/AtomicValue_mutex.h
+++ b/cpp/src/qpid/sys/AtomicValue_mutex.h
@@ -53,6 +53,8 @@ class AtomicValue
inline T operator++(int) { return fetchAndAdd(1); }
inline T operator--(int) { return fetchAndSub(1); }
+ AtomicValue& operator=(T newval) { Lock l(lock); value = newval; return *this; }
+
/** If current value == testval then set to newval. Returns the old value. */
T valueCompareAndSwap(T testval, T newval) {
Lock l(lock);