summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-07-12 09:32:48 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-27 07:58:26 (GMT)
commited31fe5336f80ecbd025e75ba19308a881eb820d (patch)
tree24f4135bdf84af1a97a2a37c6be84bc07c3314a6 /src/corelib/kernel
parentfc14f5861e18d2ebc8014bfd750a8c82cf166392 (diff)
downloadQt-ed31fe5336f80ecbd025e75ba19308a881eb820d.zip
Qt-ed31fe5336f80ecbd025e75ba19308a881eb820d.tar.gz
Qt-ed31fe5336f80ecbd025e75ba19308a881eb820d.tar.bz2
Added some asserts to avoid race conditions in networking.
Task: QT-3358 RevBy: Markus Goetz (cherry picked from commit c042003a831ace1ffe4cc399668293200ffe829f)
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 2717780..7166778 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -496,6 +496,8 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta
start();
}
+ Q_ASSERT(QThread::currentThread() == this->thread());
+
QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
Q_ASSERT(!m_AOStatuses.contains(notifier));
@@ -507,6 +509,8 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta
void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier )
{
+ Q_ASSERT(QThread::currentThread() == this->thread());
+
QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
m_AOStatuses.remove(notifier);
@@ -516,6 +520,8 @@ void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier )
void QSelectThread::restart()
{
+ Q_ASSERT(QThread::currentThread() == this->thread());
+
QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
m_waitCond.wakeAll();