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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index 0bca0def22..0ecc96a9b1 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -86,6 +86,12 @@ private:
inline bool fastTryUnlock() Q_DECL_NOTHROW {
return d_ptr.testAndSetRelease(dummyLocked(), 0);
}
+ inline bool fastTryLock(QMutexData *&current) Q_DECL_NOTHROW {
+ return d_ptr.testAndSetAcquire(0, dummyLocked(), current);
+ }
+ inline bool fastTryUnlock(QMutexData *&current) Q_DECL_NOTHROW {
+ return d_ptr.testAndSetRelease(dummyLocked(), 0, current);
+ }
void lockInternal() QT_MUTEX_LOCK_NOEXCEPT;
bool lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT;