summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qmutex.h')
-rw-r--r--src/corelib/thread/qmutex.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index dfe4aae..5f75195 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -163,6 +163,7 @@ class QMutexData
~QMutexData();
};
+#ifdef QT_NO_DEBUG
inline void QMutex::unlockInline()
{
if (d->recursive) {
@@ -189,7 +190,13 @@ inline void QMutex::lockInline()
lockInternal();
}
}
-
+#else // QT_NO_DEBUG
+//in debug we do not use inline calls in order to allow debugging tools
+// to hook the mutex locking functions.
+inline void QMutex::unlockInline() { unlock(); }
+inline bool QMutex::tryLockInline() { return tryLock(); }
+inline void QMutex::lockInline() { lock(); }
+#endif // QT_NO_DEBUG
#else // QT_NO_THREAD