QBasicAtomicInt: fix wrong comment about non-atomic API
The public documentation for load() and store() says it's atomic, and it is: * using _q_value.store(newValue, std::memory_order_relaxed) in the C++11 implementation * using a simple assignment otherwise, which is atomic (and relaxed, no memory barriers) on all the existing C++ ABIs. Change-Id: I40faa47120163225bd11c3a32514ac97ef8bbbd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
7be6438bad
commit
3b48a65e99
|
|
@ -137,12 +137,11 @@ public:
|
|||
|
||||
typename Ops::Type _q_value;
|
||||
|
||||
// Non-atomic API
|
||||
// Everything below is either implemented in ../arch/qatomic_XXX.h or (as fallback) in qgenericatomic.h
|
||||
|
||||
T load() const Q_DECL_NOTHROW { return Ops::load(_q_value); }
|
||||
void store(T newValue) Q_DECL_NOTHROW { Ops::store(_q_value, newValue); }
|
||||
|
||||
// Atomic API, implemented in qatomic_XXX.h
|
||||
|
||||
T loadAcquire() const Q_DECL_NOTHROW { return Ops::loadAcquire(_q_value); }
|
||||
void storeRelease(T newValue) Q_DECL_NOTHROW { Ops::storeRelease(_q_value, newValue); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue