summaryrefslogtreecommitdiff
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-12-02 20:27:54 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 18:06:31 +0100
commit8e26730fb7296e42d050aaa3b4af65a17f512701 (patch)
tree4723af2c6069f1569592980bf44250d8acc21ec7 /src/corelib/thread
parentaba30f02348c60ea785c374d12e1f3998dc4cb14 (diff)
downloadqtbase-8e26730fb7296e42d050aaa3b4af65a17f512701.tar.gz
Use full-barrier in the "non-atomic" API in QAtomic{Int,Integer,Pointer}
This is more in line with what std::atomic does. Change-Id: I6fe96102995a3fda8f82475758995593358735bc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qatomic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h
index 1bfadc4442..d79e168cb3 100644
--- a/src/corelib/thread/qatomic.h
+++ b/src/corelib/thread/qatomic.h
@@ -74,12 +74,12 @@ public:
: QBasicAtomicInteger<T>()
#endif
{
- this->store(other.load());
+ this->storeRelease(other.loadAcquire());
}
inline QAtomicInteger &operator=(const QAtomicInteger &other) Q_DECL_NOTHROW
{
- this->store(other.load());
+ this->storeRelease(other.loadAcquire());
return *this;
}
@@ -148,12 +148,12 @@ public:
#endif
inline QAtomicPointer(const QAtomicPointer<T> &other) Q_DECL_NOTHROW
{
- this->store(other.load());
+ this->storeRelease(other.loadAcquire());
}
inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &other) Q_DECL_NOTHROW
{
- this->store(other.load());
+ this->storeRelease(other.loadAcquire());
return *this;
}