From 78470cd6210601ccab14abdb826481a91a49f199 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 10 Oct 2011 14:41:37 +0200 Subject: Make all uses of QBasicAtomicInt and Pointer use load() and store() Change Ie3271abd1728af599f9ab17c6f4868e475f17bb6 didn't build on Mac in debug mode. This commit fixes the build. Change-Id: I925af83ea577228b60679af804aa7875a779ec3f Reviewed-on: http://codereview.qt-project.org/6331 Sanity-Review: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/corelib/thread/qmutex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index b2f52500fa..e2da0adf17 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -381,7 +381,7 @@ bool QBasicMutex::lockInternal(int timeout) // we try to aquire the mutex by changing to dummyLocked() if (this->d.testAndSetAcquire(d, dummyLocked())) { // Mutex aquired - Q_ASSERT(d->waiters == -QMutexPrivate::BigNumber || d->waiters == 0); + Q_ASSERT(d->waiters.load() == -QMutexPrivate::BigNumber || d->waiters.load() == 0); d->waiters = 0; d->deref(); return true; @@ -399,7 +399,7 @@ bool QBasicMutex::lockInternal(int timeout) // Mutex was unlocked. if (old_waiters != QMutexPrivate::BigNumber) { //we did not break the previous loop - Q_ASSERT(d->waiters >= 1); + Q_ASSERT(d->waiters.load() >= 1); d->waiters.deref(); } d->deref(); @@ -411,7 +411,7 @@ bool QBasicMutex::lockInternal(int timeout) d->deref(); d->derefWaiters(1); //we got the lock. (do not deref) - Q_ASSERT(d == this->d); + Q_ASSERT(d == this->d.load()); return true; } else { Q_ASSERT(timeout >= 0); @@ -424,7 +424,7 @@ bool QBasicMutex::lockInternal(int timeout) return false; } } - Q_ASSERT(this->d); + Q_ASSERT(this->d.load() != 0); return true; } -- cgit v1.2.3