summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentiteratekernel.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-09-29 11:50:08 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-27 18:57:38 +0200
commit6476ac738ca029af95932f53b53f0705808eb80e (patch)
treed1884397040eb65d23a48a0e1a56dad3f476cf34 /src/corelib/concurrent/qtconcurrentiteratekernel.h
parent434824aede28e8c36d6991aa218f89daf2cc22fa (diff)
Replace implicit QAtomic* casts with explicit load()/store()
Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentiteratekernel.h')
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.h b/src/corelib/concurrent/qtconcurrentiteratekernel.h
index c6fcb973ab5..49c053caf7b 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.h
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.h
@@ -214,9 +214,9 @@ public:
bool shouldStartThread()
{
if (forIteration)
- return (currentIndex < iterationCount) && !this->shouldThrottleThread();
+ return (currentIndex.load() < iterationCount) && !this->shouldThrottleThread();
else // whileIteration
- return (iteratorThreads == 0);
+ return (iteratorThreads.load() == 0);
}
ThreadFunctionResult threadFunction()
@@ -238,7 +238,7 @@ public:
const int currentBlockSize = blockSizeManager.blockSize();
- if (currentIndex >= iterationCount)
+ if (currentIndex.load() >= iterationCount)
break;
// Atomically reserve a block of iterationCount for this thread.
@@ -269,7 +269,7 @@ public:
// Report progress if progress reporting enabled.
if (progressReportingEnabled) {
completed.fetchAndAddAcquire(finalBlockSize);
- this->setProgressValue(this->completed);
+ this->setProgressValue(this->completed.load());
}
if (this->shouldThrottleThread())