summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-27 02:09:39 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-27 02:09:39 (GMT)
commit53e77aace976b5c908ea71f15146ccb575fb1cc5 (patch)
treec4836665d94e9156c6a502cef1e2a63d288fe025 /src/corelib
parent59c58576efd3ceff7add46a359fd99e56a2fb279 (diff)
parent15866a4436814da5da9348a8c930ee1d826ecb9a (diff)
downloadQt-53e77aace976b5c908ea71f15146ccb575fb1cc5.zip
Qt-53e77aace976b5c908ea71f15146ccb575fb1cc5.tar.gz
Qt-53e77aace976b5c908ea71f15146ccb575fb1cc5.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (31 commits) Make symbian/unix shadow builds work again. Change the files to camelcase as avkon now does that Update EABI and WINSCW DEF files for Symbian Fix linking on arm with def files Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 4b88f595ab62b7c5f703a286c4f5f13f8784a936 Fixed incorrect parsing of TARGET.EPOCHEAPSIZE. Fixed make runonphone that looked for the package in the wrong place. Fixed several problems with the postlinker for Symbian (elf2e32). Don't crash when cleaning the uninitialized fontdatabase (Symbian) Revert "Fixing the race condition in event dispatcher implementation on" Revert "Fixing race condition in qeventdispatcher_symbian.cpp code path" Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to a80fd59e3b3b18116803a14e6369345933994236 Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to a80fd59e3b3b18116803a14e6369345933994236 Fixed memory restrictions not being passed on to elf2e32. Allow TLW translucency on Symbian without Qt::FramelessWindowHint Updated UIDs for spectrum demo Ensure that compiling with the no debug/warning output defines works Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to f0dcb906fe56b5dc06aa305b6cfc821d5dd25a28 Clean up HB_Anchor's DeviceTables on failure when loading format 3 Make sure ValueRecord's DeviceTables are cleaned up on failure ...
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp46
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h20
2 files changed, 10 insertions, 56 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 9d8ee5a..e86efb2 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -100,40 +100,25 @@ static inline int qt_socket_select(int nfds, fd_set *readfds, fd_set *writefds,
class QSelectMutexGrabber
{
public:
- QSelectMutexGrabber(int fd, QMutex *threadMutex, QMutex *selectCallMutex)
- : m_threadMutex(threadMutex), m_selectCallMutex(selectCallMutex), bHasThreadLock(false)
+ QSelectMutexGrabber(int fd, QMutex *mutex)
+ : m_mutex(mutex)
{
- // see if selectThread is waiting m_waitCond
- // if yes ... dont write to pipe
- if (m_threadMutex->tryLock()) {
- bHasThreadLock = true;
+ if (m_mutex->tryLock())
return;
- }
-
- // still check that SelectThread
- // is in select call
- if (m_selectCallMutex->tryLock()) {
- m_selectCallMutex->unlock();
- return;
- }
char dummy = 0;
qt_pipe_write(fd, &dummy, 1);
- m_threadMutex->lock();
- bHasThreadLock = true;
+ m_mutex->lock();
}
~QSelectMutexGrabber()
{
- if(bHasThreadLock)
- m_threadMutex->unlock();
+ m_mutex->unlock();
}
private:
- QMutex *m_threadMutex;
- QMutex *m_selectCallMutex;
- bool bHasThreadLock;
+ QMutex *m_mutex;
};
/*
@@ -415,12 +400,7 @@ void QSelectThread::run()
int ret;
int savedSelectErrno;
- {
- // helps fighting the race condition between
- // selctthread and new socket requests (cancel, restart ...)
- QMutexLocker locker(&m_selectCallMutex);
- ret = qt_socket_select(maxfd, &readfds, &writefds, &exceptionfds, 0);
- }
+ ret = qt_socket_select(maxfd, &readfds, &writefds, &exceptionfds, 0);
savedSelectErrno = errno;
char buffer;
@@ -515,9 +495,7 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta
start();
}
- QMutexLocker locker(&m_grabberMutex);
-
- QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex, &m_selectCallMutex);
+ QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
Q_ASSERT(!m_AOStatuses.contains(notifier));
@@ -528,9 +506,7 @@ void QSelectThread::requestSocketEvents ( QSocketNotifier *notifier, TRequestSta
void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier )
{
- QMutexLocker locker(&m_grabberMutex);
-
- QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex, &m_selectCallMutex);
+ QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
m_AOStatuses.remove(notifier);
@@ -539,9 +515,7 @@ void QSelectThread::cancelSocketEvents ( QSocketNotifier *notifier )
void QSelectThread::restart()
{
- QMutexLocker locker(&m_grabberMutex);
-
- QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex, &m_selectCallMutex);
+ QSelectMutexGrabber lock(m_pipeEnds[1], &m_mutex);
m_waitCond.wakeAll();
}
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index 211ded4..bc42753 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -211,26 +211,6 @@ private:
QMutex m_mutex;
QWaitCondition m_waitCond;
bool m_quit;
-
- // to protect when several
- // requests like:
- // requestSocketEvents
- // cancelSocketEvents
- // kick in the same time
- // all will fight for m_mutex
- //
- // TODO: fix more elegantely
- //
- QMutex m_grabberMutex;
-
- // this one will tell
- // if selectthread is
- // really in select call
- // and will prevent
- // writing to pipe that
- // causes later in locking
- // of the thread in waitcond
- QMutex m_selectCallMutex;
};
class Q_CORE_EXPORT CQtActiveScheduler : public CActiveScheduler