diff options
author | mread <qt-info@nokia.com> | 2011-02-18 11:19:36 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2011-03-09 12:48:06 (GMT) |
commit | 830a08f6612346f90a321fa32de10e1e4a79d94f (patch) | |
tree | 3e4cd45ecef931eac3fea4f44f1c442908409dcb /src/corelib/thread | |
parent | c5c7ce758c991e760015fa60194a154e2ecbc622 (diff) | |
download | Qt-830a08f6612346f90a321fa32de10e1e4a79d94f.zip Qt-830a08f6612346f90a321fa32de10e1e4a79d94f.tar.gz Qt-830a08f6612346f90a321fa32de10e1e4a79d94f.tar.bz2 |
Removing RFastLock use
Benchmarks showed no benefit from RFastLock vs RSemaphore. Since
RSemaphore works on all target platforms, and RFastLock does not, there
is no benefit in using RFastLock. So to simplify the code, it is
removed.
Task-number: QTBUG-13990
Reviewed-by: Shane Kearns
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qmutex_p.h | 12 | ||||
-rw-r--r-- | src/corelib/thread/qmutex_symbian.cpp | 8 |
2 files changed, 1 insertions, 19 deletions
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h index 2588228..70860b1 100644 --- a/src/corelib/thread/qmutex_p.h +++ b/src/corelib/thread/qmutex_p.h @@ -64,11 +64,6 @@ #if defined(Q_OS_SYMBIAN) # include <e32std.h> -# ifdef __SYMBIAN_KERNEL_HYBRID_HEAP__ -# define QT_SYMBIAN_USE_RFASTLOCK -# else -# undef QT_SYMBIAN_USE_RFASTLOCK -# endif #endif QT_BEGIN_NAMESPACE @@ -97,14 +92,7 @@ public: #elif defined(Q_OS_WIN32) || defined(Q_OS_WINCE) HANDLE event; #elif defined(Q_OS_SYMBIAN) -# ifdef QT_SYMBIAN_USE_RFASTLOCK - // RFastLock is a fast semaphone which only calls into the kernel side if there is contention - RFastLock lock; -# else - // RSemaphore is used on Symbian OS versions that do not have a timed RFastLock wait. - // There is no timed wait on RMutex itself, so RSemaphore has to be used instead. RSemaphore lock; -# endif #endif }; diff --git a/src/corelib/thread/qmutex_symbian.cpp b/src/corelib/thread/qmutex_symbian.cpp index c5671f5..f5ff57c 100644 --- a/src/corelib/thread/qmutex_symbian.cpp +++ b/src/corelib/thread/qmutex_symbian.cpp @@ -55,13 +55,7 @@ QT_BEGIN_NAMESPACE QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode) : QMutexData(mode), maximumSpinTime(MaximumSpinTimeThreshold), averageWaitTime(0), owner(0), count(0) { -#ifdef QT_SYMBIAN_USE_RFASTLOCK - int r = lock.CreateLocal(); - if (r == KErrNone) - lock.Wait(); -#else - int r = lock.CreateLocal(0); -#endif + int r = lock.CreateLocal(0); if (r != KErrNone) qWarning("QMutex: failed to create lock, error %d", r); qt_symbian_throwIfError(r); |