From d8eb52fc45d0209a07b07be2c0f54a9167704574 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 11 Aug 2012 12:18:45 +0200 Subject: 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 --- src/corelib/thread/qmutex.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/thread/qmutex.cpp') diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 2906a5a198..35bb3ac78e 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -361,6 +361,14 @@ bool QBasicMutex::isRecursive() /*! \internal helper for lock() */ +void QBasicMutex::lockInternal() QT_MUTEX_LOCK_NOEXCEPT +{ + lockInternal(-1); +} + +/*! + \internal helper for lock(int) + */ bool QBasicMutex::lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT { Q_ASSERT(!isRecursive()); -- cgit v1.2.3