summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-11 12:18:45 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 03:45:50 +0200
commitd8eb52fc45d0209a07b07be2c0f54a9167704574 (patch)
tree6ad42f3182237d2720a48a408e0bcbc5bb49dc92 /src/corelib/thread/qmutex.h
parentfc174a37283306f3f5c06efeda22d5164820c164 (diff)
Split the timed mutex lock from the non-timed lock functions
Non-timed mutex locks are by far more common, so let's try not to penalise the locking of those with code that won't get used that often. Change-Id: I37f56d6429836467fdec2e588c0fb22d914b5d75 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/thread/qmutex.h')
-rw-r--r--src/corelib/thread/qmutex.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index dd718c4796..dd1455058d 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -89,7 +89,8 @@ private:
return d_ptr.testAndSetRelease(dummyLocked(), 0);
}
- bool lockInternal(int timeout = -1) QT_MUTEX_LOCK_NOEXCEPT;
+ void lockInternal() QT_MUTEX_LOCK_NOEXCEPT;
+ bool lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT;
void unlockInternal() Q_DECL_NOTHROW;
QBasicAtomicPointer<QMutexData> d_ptr;