summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp')
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
index b23e11b153..abd3d6bbef 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
@@ -75,7 +75,7 @@ QOnceControl::QOnceControl(QBasicAtomicInt *control)
d = 0;
gv = control;
// check if code has already run once
- if (*gv == 2) {
+ if (gv->loadAcquire() == 2) {
// uncontended case: it has already initialized
// no waiting
return;