diff options
Diffstat (limited to 'cpp/src/qpid/sys/AtomicValue_mutex.h')
-rw-r--r-- | cpp/src/qpid/sys/AtomicValue_mutex.h | 2 |
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); |