summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-02-14 12:13:53 -0800
committerDavid Faure <david.faure@kdab.com>2017-02-15 08:08:58 +0000
commitb58af67d7b5f22eaf2916b91d8a7060781203561 (patch)
tree0a64ed53af9efff75731c36ced07bea405d4903f /src/corelib/thread/qthread_p.h
parent265db5ad9bda9c984393c1e95fd27dcc4633ed1c (diff)
Turn QThreadData::threadId into a QAtomicPointer
Solves a data race found by TSan. Since thread and threadId are QAtomicPointer, I've removed the explicit initialization in the QThreadData constructor Task-number: QTBUG-58855 Change-Id: I4139d5f93dcb4b429ae9fffd14a34082f2683f76 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/thread/qthread_p.h')
-rw-r--r--src/corelib/thread/qthread_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 37eca9c612..885b4c0c1e 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -284,7 +284,7 @@ public:
QStack<QEventLoop *> eventLoops;
QPostEventList postEventList;
QAtomicPointer<QThread> thread;
- Qt::HANDLE threadId;
+ QAtomicPointer<void> threadId;
QAtomicPointer<QAbstractEventDispatcher> eventDispatcher;
QVector<void *> tls;
FlaggedDebugSignatures flaggedSignatures;