summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex_win.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-04-21 18:17:08 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-18 10:32:31 (GMT)
commitc25a6e090c8074e68d7eb40f2533da8bab5e7dd8 (patch)
tree0d881265383a23871aa6f93c02f756b5dc8d36e1 /src/corelib/thread/qmutex_win.cpp
parentaef03d80f7d9b71dfe777cd7927808d69dac0c27 (diff)
downloadQt-c25a6e090c8074e68d7eb40f2533da8bab5e7dd8.zip
Qt-c25a6e090c8074e68d7eb40f2533da8bab5e7dd8.tar.gz
Qt-c25a6e090c8074e68d7eb40f2533da8bab5e7dd8.tar.bz2
Inline the common case when there is no contention.
QMutex locking could be used in performence critical code (such as QObject and co.) where the cost of a function call is not neglectible. This would slow down the common case where there is only one thread and no contention. Since we need to keep the old symbol for binary compatibilty, introduce new *Inline function. Reviewed-by: Brad
Diffstat (limited to 'src/corelib/thread/qmutex_win.cpp')
-rw-r--r--src/corelib/thread/qmutex_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp
index 9d58953..a810000 100644
--- a/src/corelib/thread/qmutex_win.cpp
+++ b/src/corelib/thread/qmutex_win.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode)
- : recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0)
+ : QMutexData(mode), lastSpinCount(0), owner(0), count(0)
{
event = CreateEvent(0, FALSE, FALSE, 0);
if (!event)