| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | namespace { | - |
| 6 | enum { | - |
| 7 | StateMask = 0x3, | - |
| 8 | StateLockedForRead = 0x1, | - |
| 9 | StateLockedForWrite = 0x2, | - |
| 10 | }; | - |
| 11 | const auto dummyLockedForRead = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(StateLockedForRead)); | - |
| 12 | const auto dummyLockedForWrite = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(StateLockedForWrite)); | - |
| 13 | inline bool isUncontendedLocked(const QReadWriteLockPrivate *d) | - |
| 14 | { returnexecuted 317361 times by 523 tests: return quintptr(d) & StateMask;Executed by:- tst_QAbstractFileEngine
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_NoApplication
- tst_QDBusConnection_SpyHook
- tst_QDBusServiceWatcher
- tst_QDBusThreading
- tst_QDirIterator
- tst_QFile
- tst_QGlobalStatic
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_collections - unknown status
- tst_compiler - unknown status
- tst_gestures - unknown status
- tst_lancelot - unknown status
- tst_languagechange - unknown status
- tst_largefile - unknown status
- tst_modeltest - unknown status
- tst_networkselftest - unknown status
- tst_platformsocketengine - unknown status
- tst_q_func_info - unknown status
- ...
quintptr(d) & StateMask;executed 317361 times by 523 tests: return quintptr(d) & StateMask;Executed by:- tst_QAbstractFileEngine
- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_NoApplication
- tst_QDBusConnection_SpyHook
- tst_QDBusServiceWatcher
- tst_QDBusThreading
- tst_QDirIterator
- tst_QFile
- tst_QGlobalStatic
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_collections - unknown status
- tst_compiler - unknown status
- tst_gestures - unknown status
- tst_lancelot - unknown status
- tst_languagechange - unknown status
- tst_largefile - unknown status
- tst_modeltest - unknown status
- tst_networkselftest - unknown status
- tst_platformsocketengine - unknown status
- tst_q_func_info - unknown status
- ...
} | 317361 |
| 15 | } | - |
| 16 | QReadWriteLock::QReadWriteLock(RecursionMode recursionMode) | - |
| 17 | : dd_ptr(recursionMode == Recursive ? new QReadWriteLockPrivate(recursionMode))true) : nullptr) | - |
| 18 | { | - |
| 19 | ((!(!(quintptr(d_ptr.load()) & StateMask))) ? qt_assert_x("QReadWriteLock::QReadWriteLock", "bad d_ptr alignment",__FILE__,147) : qt_noop()); | - |
| 20 | }executed 42232 times by 296 tests: end of blockExecuted by:- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- tst_QButtonGroup
- tst_QCalendarWidget
- ...
| 42232 |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | QReadWriteLock::~QReadWriteLock() | - |
| 29 | { | - |
| 30 | auto d = d_ptr.load(); | - |
| 31 | if (isUncontendedLocked(d)| TRUE | never evaluated | | FALSE | evaluated 43112 times by 519 testsEvaluated by:- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_NoApplication
- tst_QDBusConnection_SpyHook
- tst_QDBusServiceWatcher
- tst_QDBusThreading
- tst_QGlobalStatic
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_collections - unknown status
- tst_compiler - unknown status
- tst_gestures - unknown status
- tst_lancelot - unknown status
- tst_languagechange - unknown status
- tst_largefile - unknown status
- tst_modeltest - unknown status
- tst_networkselftest - unknown status
- tst_platformsocketengine - unknown status
- tst_q_func_info - unknown status
- tst_qabstractanimation - unknown status
- tst_qabstractbutton - unknown status
- tst_qabstractfileengine - unknown status
- tst_qabstractitemmodel - unknown status
- ...
|
) { | 0-43112 |
| 32 | QMessageLogger(__FILE__, 160, __PRETTY_FUNCTION__).warning("QReadWriteLock: destroying locked QReadWriteLock"); | - |
| 33 | return; never executed: return; | 0 |
| 34 | } | - |
| 35 | delete d; | - |
| 36 | }executed 43112 times by 519 tests: end of blockExecuted by:- tst_QDBusAbstractInterface
- tst_QDBusConnection
- tst_QDBusConnection_NoApplication
- tst_QDBusConnection_SpyHook
- tst_QDBusServiceWatcher
- tst_QDBusThreading
- tst_QGlobalStatic
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_collections - unknown status
- tst_compiler - unknown status
- tst_gestures - unknown status
- tst_lancelot - unknown status
- tst_languagechange - unknown status
- tst_largefile - unknown status
- tst_modeltest - unknown status
- tst_networkselftest - unknown status
- tst_platformsocketengine - unknown status
- tst_q_func_info - unknown status
- tst_qabstractanimation - unknown status
- tst_qabstractbutton - unknown status
- tst_qabstractfileengine - unknown status
- tst_qabstractitemmodel - unknown status
- ...
| 43112 |
| 37 | void QReadWriteLock::lockForRead() | - |
| 38 | { | - |
| 39 | QMutexLocker lockif (&d->mutexd_ptr.testAndSetAcquire(nullptr, dummyLockedForRead)| TRUE | evaluated 1557572 times by 355 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- tst_QButtonGroup
- ...
| | FALSE | evaluated 143670 times by 10 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
|
) | 143670-1557572 |
| 40 | return;executed 1557572 times by 355 tests: return;Executed by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- tst_QButtonGroup
- ...
| 1557572 |
| 41 | tryLockForRead(-1); | - |
| Qt}executed 143670 times by 10 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
| |
| 43 | bool QReadWriteLock::HANDLE self =tryLockForRead() | - |
| 44 | { | - |
| 45 | returnexecuted 43 times by 2 tests: return tryLockForRead(0);Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
tryLockForRead(executed 43 times by 2 tests: return tryLockForRead(0);Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
executed 43 times by 2 tests: return tryLockForRead(0);Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
0);executed 43 times by 2 tests: return tryLockForRead(0);Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 43 |
| 46 | } | - |
| 47 | bool QReadWriteLock::tryLockForRead(int timeout) | - |
| 48 | { | - |
| 49 | | - |
| 50 | QReadWriteLockPrivate *d; | - |
| 51 | if (d_ptr.testAndSetAcquire| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 143712 times by 10 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
|
(nullptr, dummyLockedForRead, d->recursive)| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 143712 times by 10 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
|
) | 4-143712 |
| 52 | returnexecuted 4 times by 1 test: return true; true;executed 4 times by 1 test: return true; | 4 |
| 53 | | - |
| 54 | while (true) { | - |
| 55 | self = QThread::currentThreadId(); | 0-143712 |
| | |
| QHash<Qt::HANDLE, int>::iterator it =if (d ->currentReaders== 0| TRUE | never evaluated | | FALSE | evaluated 143712 times by 10 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
|
) { | |
| 56 | if (!d_ptr| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
.findtestAndSetAcquire(self);nullptr, dummyLockedForRead, d)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 57 | continue; never executed: continue; | 0 |
| 58 | return never executed: return true; true;never executed: return true; | 0 |
| 59 | } | - |
| 60 | | - |
| 61 | if ((| TRUE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 132514 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 132514 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
quintptr(it !=d->currentReaders.end())) & StateMask) == StateLockedForRead| TRUE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 132514 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 11198-132514 |
| 62 | | - |
| 63 | ++it.value(); | - |
| ++const auto val = reinterpret_cast<QReadWriteLockPrivate *>(quintptr(d->accessCount;) + (1U<<4)); | |
| 64 | ((!(d->accessCountquintptr(val) > 0))(1U<<4))) ? qt_assert_x("QReadWriteLock::lockForReadtryLockForRead()", "Overflow in lock counter", | - |
| 65 | __FILE__ | - |
| 66 | , | - |
| 67 | 148240 | - |
| 68 | ) : qt_noop()) | - |
| 69 | ; | - |
| return; | |
| 70 | } | 0-11198 |
| } | |
| | |
| whileif (!d_ptr.testAndSetAcquire| TRUE | never evaluated | | FALSE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
(d->accessCount < 0 ||d->waitingWriters) {| TRUE | never evaluated | | FALSE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| |
| ++| TRUE | never evaluated | | FALSE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| TRUE | never evaluated | | FALSE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
, val, d->waitingReaders)| TRUE | never evaluated | | FALSE | evaluated 11198 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
) | |
| 71 | continue never executed: continue; never executed: continue; never executed: continue; ;never executed: continue; | 0 |
| 72 | d->readerWait.wait(&d->mutex); | 11198 |
| --d->waitingReadersreturnexecuted 11198 times by 6 tests: return true;Executed by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
executed 11198 times by 6 tests: return true;Executed by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
true;executed 11198 times by 6 tests: return true;Executed by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| |
| 73 | } | - |
| 74 | | - |
| 75 | if (d ->recursive== dummyLockedForWrite| TRUE | evaluated 42 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 132472 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) d{ | 42-132472 |
| 76 | if (!timeout| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 2-40 |
| 77 | returnexecuted 2 times by 1 test: return false; false;executed 2 times by 1 test: return false; | 2 |
| 78 | | - |
| 79 | | - |
| 80 | auto val = QReadWriteLockPrivate::allocate(); | - |
| 81 | val->currentReaderswriterCount = 1; | - |
| 82 | if (!d_ptr| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
.inserttestAndSetOrdered(selfd, 1);| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| 0-40 |
| | |
| ++| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
val, d)| TRUE | never evaluated | | FALSE | evaluated 40 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | |
| 83 | val->accessCountwriterCount = 0; | - |
| 84 | ((!(dval->accessCount > 0))release(); | - |
| 85 | continue; never executed: continue; | 0 |
| 86 | } | - |
| 87 | d = val; | - |
| 88 | }executed 40 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 40 |
| 89 | ((!(!isUncontendedLocked(d))) ? qt_assert_xqt_assert("QReadWriteLock::lockForRead()", "Overflow in lock counter"!isUncontendedLocked(d)",__FILE__,162260) : qt_noop()); | - |
| 90 | | - |
| 91 | | - |
| 92 | } | 126-132386 |
| bool QReadWriteLock::tryLockForRead() | |
| { | |
| QMutexLocker lock(&d->mutex); | |
| | |
| Qt::HANDLE self = 0;if (d->recursive| TRUE | evaluated 126 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 132386 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | |
| 93 | { | 126 |
| self = QThread::currentThreadId(); | |
| | |
| QHash<Qt::HANDLE, int>::iterator it =returnexecuted 126 times by 5 tests: return d->recursiveLockForRead(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
executed 126 times by 5 tests: return d->recursiveLockForRead(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
d->currentReaders.findrecursiveLockForRead(selftimeout);executed 126 times by 5 tests: return d->recursiveLockForRead(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| |
| 94 | | - |
| 95 | QMutexLocker lock(&d->mutex); | - |
| 96 | if (it !=d ->currentReaders!= d_ptr.endload()| TRUE | never evaluated | | FALSE | evaluated 132386 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 0-132386 |
| 97 | | - |
| 98 | | - |
| 99 | | - |
| 100 | | - |
| 101 | | - |
| 102 | | - |
| 103 | ++itd = d_ptr.valueloadAcquire(); | - |
| 104 | ++d->accessCountcontinue never executed: continue; ;never executed: continue; | 0 |
| 105 | ((!(} | - |
| 106 | returnexecuted 132386 times by 3 tests: return d->lockForRead(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
executed 132386 times by 3 tests: return d->lockForRead(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
executed 132386 times by 3 tests: return d->lockForRead(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
d->accessCount > 0)) ? qt_assert_xlockForRead("QReadWriteLocktimeout);executed 132386 times by 3 tests: return d->lockForRead(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 132386 |
| 107 | } | - |
| 108 | } never executed: end of block | 0 |
| 109 | void QReadWriteLock::tryLockForReadlockForWrite() | - |
| ", "Overflow in lock counter"{ | |
| 111 | tryLockForWrite(-1); | - |
| 112 | }executed 348346 times by 568 tests: end of blockExecuted by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- ...
| 348346 |
| 113 | bool QReadWriteLock::tryLockForWrite() | - |
| 114 | { | - |
| 115 | returnexecuted 62 times by 4 tests: return tryLockForWrite(0);Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
tryLockForWrite(0);executed 62 times by 4 tests: return tryLockForWrite(0);Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| 62 |
| 116 | } | - |
| 117 | bool QReadWriteLock::tryLockForWrite(int timeout) | - |
| 118 | { | - |
| 119 | | - |
| 120 | QReadWriteLockPrivate *d; | - |
| 121 | if (d_ptr.testAndSetAcquire(nullptr| TRUE | evaluated 345353 times by 565 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| | FALSE | evaluated 3057 times by 11 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
| TRUE | evaluated 345353 times by 565 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| | FALSE | evaluated 3057 times by 11 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
, __FILE__dummyLockedForWrite, 194d)| TRUE | evaluated 345353 times by 565 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| | FALSE | evaluated 3057 times by 11 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | 3057-345353 |
| 122 | returnexecuted 345353 times by 565 tests: return true;Executed by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
true;executed 345353 times by 565 tests: return true;Executed by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| 345353 |
| 123 | | - |
| 124 | while (true) : qt_noop()){ | - |
| 125 | if (d == 0| TRUE | never evaluated | | FALSE | evaluated 3057 times by 11 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 0-3057 |
| 126 | if (!d_ptr.testAndSetAcquire(d, dummyLockedForWrite, d)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 127 | continue never executed: continue; never executed: continue; never executed: continue; ;never executed: continue; | 0 |
| 128 | return never executed: return true; true;never executed: return true; | 0 |
| 129 | }} | - |
| 130 | | - |
| 131 | if (isUncontendedLocked| TRUE | evaluated 88 times by 5 testsEvaluated by:- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| | FALSE | evaluated 2969 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
(d->accessCount < 0)| TRUE | evaluated 88 times by 5 testsEvaluated by:- tst_QMetaType
- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| | FALSE | evaluated 2969 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 88-2969 |
| 132 | if (!timeout| TRUE | evaluated 10 times by 3 testsEvaluated by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWriteLocker
| | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 10-78 |
| 133 | returnexecuted 10 times by 3 tests: return false;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWriteLocker
false;executed 10 times by 3 tests: return false;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWriteLocker
| 10 |
| 134 | | - |
| 135 | | - |
| 136 | auto val = QReadWriteLockPrivate::allocate(); | - |
| 137 | if (d ->recursive== dummyLockedForWrite| TRUE | evaluated 54 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 24 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 24-54 |
| 138 | dvalexecuted 54 times by 3 tests: val->writerCount = 1;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
->currentReaderswriterCount = 1;executed 54 times by 3 tests: val->writerCount = 1;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 54 |
| 139 | else | - |
| 140 | val->readerCount = (quintptr(d) >> 4) + 1;executed 24 times by 3 tests: val->readerCount = (quintptr(d) >> 4) + 1;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 24 |
| 141 | if (!d_ptr| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
.inserttestAndSetOrdered(selfd, 1);| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| 0-78 |
| | |
| ++| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
val, d)| TRUE | never evaluated | | FALSE | evaluated 78 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | |
| 142 | val->accessCount; | - |
| ((!(dwriterCount = val->accessCount >readerCount = 0)); | |
| 143 | val->release(); | - |
| 144 | continue; never executed: continue; | 0 |
| 145 | } | - |
| 146 | d = val; | - |
| 147 | }executed 78 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 78 |
| 148 | ((!(!isUncontendedLocked(d))) ? qt_assert_xqt_assert("QReadWriteLock::tryLockForRead()", "Overflow in lock counter"!isUncontendedLocked(d)",__FILE__,205367) : qt_noop()); | - |
| 149 | | - |
| 150 | | - |
| 151 | if (d->recursive| TRUE | evaluated 76 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| | FALSE | evaluated 2971 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 76-2971 |
| 152 | returnexecuted 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
true;executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 76 |
| }executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| |
| bool QReadWriteLock::tryLockForReadexecuted 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
d->recursiveLockForWrite(inttimeout)executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| |
| {executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
);executed 76 times by 8 tests: return d->recursiveLockForWrite(timeout);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| |
| 153 | | - |
| 154 | QMutexLocker lock(&d->mutex); | - |
| 155 | Qt::HANDLE self = 0;if (d ->recursive)!= d_ptr.load()| TRUE | never evaluated | | FALSE | evaluated 2971 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 0-2971 |
| 156 | | - |
| 157 | | - |
| 158 | | - |
| 159 | selfd = QThread::currentThreadIdd_ptr.loadAcquire(); | - |
| 160 | QHash<Qt::HANDLE, int>::iterator it =continue; never executed: continue; | 0 |
| 161 | } | - |
| 162 | returnexecuted 2971 times by 3 tests: return d->lockForWrite(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
executed 2971 times by 3 tests: return d->lockForWrite(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
executed 2971 times by 3 tests: return d->lockForWrite(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
d->currentReaders.findlockForWrite(selftimeout);executed 2971 times by 3 tests: return d->lockForWrite(timeout);Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 2971 |
| 163 | if (it != d->currentReaders.end())} | - |
| 164 | } never executed: end of block | 0 |
| 165 | void QReadWriteLock::unlock() | - |
| 166 | { | - |
| 167 | ++itQReadWriteLockPrivate *d = d_ptr.valueload(); | - |
| 168 | ++d->accessCount;while (true) { | - |
| 169 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::tryLockForReadunlock()", "Overflow"Cannot inunlock lockan counter"unlocked lock",__FILE__,242397) : qt_noop())()); | - |
| 170 | | - |
| 171 | | - |
| 172 | if (quintptr(d) <= 2| TRUE | evaluated 1902811 times by 572 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- ...
| | FALSE | evaluated 146830 times by 13 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 146830-1902811 |
| 173 | if (!d_ptr.testAndSetRelease(d, nullptr, d)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 1902810 times by 572 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- ...
|
) | 1-1902810 |
| 174 | continueexecuted 1 time by 1 test: continue; executed 1 time by 1 test: continue; executed 1 time by 1 test: continue; ;executed 1 time by 1 test: continue; | 1 |
| 175 | returnexecuted 1902810 times by 572 tests: return;Executed by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- ...
true;executed 1902810 times by 572 tests: return;Executed by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- ...
| 1902810 |
| 176 | }} | - |
| 177 | | - |
| 178 | whileif ((| TRUE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 135633 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
quintptr| TRUE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 135633 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
(d->accessCount < 0 ||d->waitingWriters) & StateMask) == StateLockedForRead| TRUE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| | FALSE | evaluated 135633 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 11197-135633 |
| 179 | ++((!(quintptr(d->waitingReaders; | - |
| bool success =) > (1U<<4))) ? qt_assert("quintptr(d->readerWait.wait) > (&d->mutex1U<<4)",timeout__FILE__,407) : qt_noop()); | |
| 180 | | - |
| 181 | auto val = reinterpret_cast<0 ?QReadWriteLockPrivate *>(quintptr(9223372036854775807L * 2UL + 1ULd) : ulong- (timeout1U<<4)); | - |
| 182 | --d->waitingReaders;if (!success)| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| 0-11197 |
| return false;| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| |
| }| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| |
| if (d->recursive)| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| |
| d->currentReaders| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
d_ptr.inserttestAndSetRelease(selfd, 1);| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| |
| | |
| ++| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
val, d->accessCount)| TRUE | never evaluated | | FALSE | evaluated 11197 times by 6 testsEvaluated by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
|
) | |
| 183 | continue never executed: continue; never executed: continue; never executed: continue; ;never executed: continue; | 0 |
| 184 | ((!(return;executed 11197 times by 6 tests: return;Executed by:- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_Spdy
| 11197 |
| 185 | } | - |
| 186 | | - |
| 187 | ((!(!isUncontendedLocked(d->accessCount > 0))))) ? qt_assert_xqt_assert("QReadWriteLock::tryLockForRead()", "Overflow in lock counter"!isUncontendedLocked(d)",__FILE__,258415) : qt_noop()); | - |
| 188 | | - |
| 189 | if (d->recursive| TRUE | evaluated 159 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| | FALSE | evaluated 135474 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 159-135474 |
| 190 | d->recursiveUnlock(); | - |
| 191 | returnexecuted 159 times by 8 tests: return;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
true;executed 159 times by 8 tests: return;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 159 |
| 192 | } | - |
| 193 | | - |
| 194 | void QReadWriteLock::lockForWrite() | - |
| {QMutexLocker locklocker(&d->mutex); | |
| 195 | Qt::HANDLE self = 0;if (d->recursivewriterCount| TRUE | evaluated 3064 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 132410 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 3064-132410 |
| 196 | self = QThread::currentThreadId(); | - |
| | |
| if (((!(d->currentWriterwriterCount == self) { | |
| --d1)) ? qt_assert("d->accessCount;writerCount == 1",__FILE__,424) : qt_noop()); | |
| 197 | ((!(d->accessCount <readerCount == 0)) ? qt_assert_xqt_assert("QReadWriteLock::lockForWrite()", "Overflow in"d->readerCount lock== counter"0",__FILE__,285425) : qt_noop()) | - |
| ; | |
| return; | |
| } | |
| } | |
| | |
| while (()); | |
| 198 | d->accessCount !=writerCount = 0); | - |
| 199 | }executed 3064 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
else { | 3064 |
| 200 | ++((!(d->waitingWriters;readerCount > 0)) ? qt_assert("d->readerCount > 0",__FILE__,428) : qt_noop()); | - |
| 201 | d->writerWait.waitreaderCount--; | - |
| 202 | if (&d->mutex); | 265-132145 |
| --d->waitingWritersreaderCount > 0| TRUE | evaluated 132145 times by 1 test | | FALSE | evaluated 265 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | |
| 203 | returnexecuted 132145 times by 1 test: return; executed 132145 times by 1 test: return; executed 132145 times by 1 test: return; ;executed 132145 times by 1 test: return; | 132145 |
| 204 | }executed 265 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 265 |
| 205 | | - |
| 206 | if (d->recursive)waitingReaders| TRUE | evaluated 327 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 3002 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
|| d->currentWriter = self;| TRUE | evaluated 2884 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 118 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| 118-3002 |
| | |
| --| TRUE | evaluated 2884 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 118 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | evaluated 2884 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 118 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
waitingWriters| TRUE | evaluated 2884 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 118 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | |
| 207 | d->accessCount;unlock(); | - |
| 208 | }executed 3211 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
else { | 3211 |
| 209 | ((!(d_ptr.load() == d->accessCount < 0)) ? qt_assert_xqt_assert("QReadWriteLock::lockForWrite"d_ptr.load()", "Overflow in lock== counter"d",__FILE__,299437) : qt_noop()); | - |
| 210 | d_ptr.storeRelease(nullptr); | - |
| 211 | d->release(); | - |
| 212 | }executed 118 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 118 |
| 213 | boolreturn;executed 3329 times by 3 tests: return;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 3329 |
| 214 | } | - |
| 215 | } never executed: end of block | 0 |
| 216 | | - |
| 217 | | - |
| 218 | QReadWriteLock::tryLockForWriteStateForWaitCondition QReadWriteLock::stateForWaitCondition() const | - |
| 219 | { | - |
| 220 | QMutexLocker lock(&d->mutex); | - |
| | |
| Qt::HANDLE selfQReadWriteLockPrivate *d = 0d_ptr.load(); | |
| 221 | switch (quintptr(d) & StateMask) { | - |
| 222 | caseexecuted 25 times by 1 test: case StateLockedForRead: StateLockedForRead:executed 25 times by 1 test: case StateLockedForRead: returnexecuted 25 times by 1 test: return LockedForRead; LockedForRead;executed 25 times by 1 test: return LockedForRead; | 25 |
| 223 | caseexecuted 108 times by 1 test: case StateLockedForWrite: StateLockedForWrite:executed 108 times by 1 test: case StateLockedForWrite: returnexecuted 108 times by 1 test: return LockedForWrite; LockedForWrite;executed 108 times by 1 test: return LockedForWrite; | 108 |
| 224 | } | - |
| 225 | | - |
| 226 | if (!d| TRUE | never evaluated | | FALSE | evaluated 141 times by 1 test |
) | 0-141 |
| 227 | return never executed: return Unlocked; Unlockednever executed: return Unlocked; never executed: return Unlocked; ;never executed: return Unlocked; | 0 |
| 228 | if (d->recursivewriterCount > 1| TRUE | never evaluated | | FALSE | evaluated 141 times by 1 test |
) | 0-141 |
| 229 | { | 0 |
| self = QThread::currentThreadId();return never executed: return RecursivelyLocked; never executed: return RecursivelyLocked; RecursivelyLocked;never executed: return RecursivelyLocked; | |
| 230 | else if (d->currentWriterwriterCount == self1| TRUE | evaluated 123 times by 1 test | | FALSE | evaluated 18 times by 1 test |
) | 18-123 |
| 231 | { | 123 |
| --d->accessCountreturnexecuted 123 times by 1 test: return LockedForWrite; executed 123 times by 1 test: return LockedForWrite; LockedForWrite;executed 123 times by 1 test: return LockedForWrite; | |
| 232 | ((!(d->accessCount < 0))returnexecuted 18 times by 1 test: return LockedForRead; executed 18 times by 1 test: return LockedForRead; LockedForRead;executed 18 times by 1 test: return LockedForRead; | 18 |
| 233 | | - |
| 234 | } | - |
| 235 | | - |
| 236 | bool QReadWriteLockPrivate::lockForRead(int timeout) | - |
| 237 | { | - |
| 238 | ((!(!mutex.tryLock())) ? qt_assert_xqt_assert("QReadWriteLock::lockForWrite"!mutex.tryLock()", "Overflow in lock counter",__FILE__,328466) : qt_noop()) | - |
| ; | |
| return true()); | |
| 239 | | - |
| 240 | QElapsedTimer t; | - |
| 241 | } | 1-132492 |
| }if (d->accessCount !=timeout > 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 132492 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | |
| 242 | t.start();executed 1 time by 1 test: t.start(); | 1 |
| 243 | | - |
| 244 | while (waitingWriters| TRUE | evaluated 386 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
| | FALSE | evaluated 132543 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
|| writerCount| TRUE | evaluated 72 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 132471 times by 6 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 72-132543 |
| 245 | if (timeout ==| TRUE | evaluated 21 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 437 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | evaluated 21 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 437 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
0| TRUE | evaluated 21 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 437 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 21-437 |
| 246 | returnexecuted 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
false;executed 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 21 |
| 247 | if (d->recursivetimeout > 0| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 429 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) d->currentWriter{ | 8-429 |
| 248 | auto elapsed = self; | - |
| | |
| --d->accessCountt.elapsed(); | |
| 249 | if (elapsed > timeout| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 7 times by 1 test |
) | 1-7 |
| 250 | returnexecuted 1 time by 1 test: return false; falseexecuted 1 time by 1 test: return false; executed 1 time by 1 test: return false; ;executed 1 time by 1 test: return false; | 1 |
| 251 | waitingReaders++; | - |
| 252 | readerCond.wait(&mutex, timeout - elapsed); | - |
| 253 | }executed 7 times by 1 test: end of block else { | 7 |
| 254 | waitingReaders++; | - |
| 255 | readerCond.wait(&mutex); | - |
| 256 | }executed 429 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 429 |
| 257 | waitingReaders--; | - |
| 258 | }executed 436 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 436 |
| 259 | readerCount++; | - |
| 260 | ((!(d->accessCount <writerCount == 0)) ? qt_assert_xqt_assert("QReadWriteLock::tryLockForWrite()", "Overflow in"writerCount lock== counter"0",__FILE__,340488) : qt_noop()) | - |
| ;()); | |
| 261 | returnexecuted 132471 times by 6 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 132471 times by 6 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 132471 |
| 262 | } | - |
| 263 | | - |
| 264 | bool QReadWriteLockQReadWriteLockPrivate::tryLockForWritelockForWrite(int timeout) | - |
| 265 | { | - |
| 266 | QMutexLocker lock((!(!mutex.tryLock())) ? qt_assert(&d->"!mutex); | - |
| | |
| Qt::HANDLE self =.tryLock()",__FILE__,494) : qt_noop()); | |
| 267 | | - |
| 268 | QElapsedTimer t; | - |
| 269 | if (timeout > 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 3034 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | 1-3034 |
| 270 | t.start();executed 1 time by 1 test: t.start(); | 1 |
| 271 | | - |
| 272 | while (readerCount| TRUE | evaluated 74 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 3276 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
|| writerCount| TRUE | evaluated 264 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 3012 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 74-3276 |
| 273 | if (timeout ==| TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 316 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 316 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
0| TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 316 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 22-316 |
| 274 | returnexecuted 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
falseexecuted 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
executed 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
;executed 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 22 |
| 275 | if (d->recursivetimeout > 0| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 308 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 8-308 |
| 276 | selfauto elapsed = QThread::currentThreadIdt.elapsed(); | - |
| 277 | if (d->currentWriter == selfelapsed > timeout| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 7 times by 1 test |
) { | 1-7 |
| 278 | --d->accessCountif (waitingReaders| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
&& !waitingWriters| TRUE | never evaluated | | FALSE | never evaluated |
&& !writerCount| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0-1 |
| 279 | | - |
| 280 | | - |
| 281 | readerCond.wakeAll(); | - |
| 282 | } never executed: end of block | 0 |
| 283 | returnexecuted 1 time by 1 test: return false; falseexecuted 1 time by 1 test: return false; executed 1 time by 1 test: return false; ;executed 1 time by 1 test: return false; | 1 |
| 284 | } | - |
| 285 | waitingWriters++; | - |
| 286 | writerCond.wait(&mutex, timeout - elapsed); | - |
| 287 | }executed 7 times by 1 test: end of block else { | 7 |
| 288 | waitingWriters++; | - |
| 289 | writerCond.wait(&mutex); | - |
| 290 | }executed 308 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 308 |
| 291 | waitingWriters--; | - |
| 292 | }executed 315 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 315 |
| 293 | | - |
| 294 | ((!(d->accessCount <writerCount == 0)) ? qt_assert_xqt_assert("QReadWriteLock::lockForWrite()","writerCount "Overflow== in0",__FILE__,522) : qt_noop()); | - |
| 295 | ((!(readerCount == 0)) ? qt_assert("readerCount lock== counter"0",__FILE__,375523) : qt_noop())()); | - |
| 296 | writerCount = 1; | - |
| 297 | returnexecuted 3012 times by 9 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
true;executed 3012 times by 9 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 3012 |
| }} | |
| 299 | | - |
| while (d->accessCount != 0)void QReadWriteLockPrivate::unlock() | |
| 301 | { | - |
| 302 | ++d->waitingWriters; | - |
| bool success = d->writerWait((!(!mutex.waittryLock())) ? qt_assert(&d->"!mutex.tryLock()",timeout < 0 ? (9223372036854775807L * 2UL + 1UL__FILE__,530) : ulongqt_noop()); | |
| 303 | if (timeout)); | 417-2922 |
| --d->waitingWriters;| TRUE | evaluated 2922 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 417 times by 9 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | |
| 304 | writerCond.wakeOne();executed 2922 times by 3 tests: writerCond.wakeOne();Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 2922 |
| 305 | else if (!success(waitingReaders| TRUE | evaluated 290 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 127 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | 127-290 |
| 306 | return false;readerCond.wakeAll();executed 290 times by 3 tests: readerCond.wakeAll();Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 290 |
| 307 | }executed 3339 times by 9 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 3339 |
| 308 | | - |
| ifbool QReadWriteLockPrivate::recursiveLockForRead(d->recursiveint timeout) | |
| d->currentWriter = self; | |
| | |
| --d->accessCount;{ | |
| 311 | ((!(d->accessCount < 0recursive)) ? qt_assert_xqt_assert("QReadWriteLock::tryLockForWrite()", "Overflow in lock counter""recursive",__FILE__,393539) : qt_noop()); | - |
| 312 | QMutexLocker lock(&mutex); | - |
| 313 | | - |
| 314 | Qt::HANDLE self = QThread::currentThreadId(); | - |
| 315 | | - |
| 316 | auto it = currentReaders.find(self); | - |
| 317 | if (it != currentReaders.end| TRUE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 107 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
| TRUE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 107 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
()| TRUE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 107 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 19-107 |
| 318 | ++it.value(); | - |
| 319 | returnexecuted 19 times by 4 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 19 times by 4 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 19 |
| 320 | } | - |
| 321 | | - |
| 322 | if (!lockForRead(timeout)| TRUE | evaluated 21 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 86 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 21-86 |
| 323 | returnexecuted 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
falseexecuted 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
executed 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
;executed 21 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 21 |
| 324 | | - |
| 325 | currentReaders.insert(self, 1); | - |
| 326 | returnexecuted 86 times by 5 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 86 times by 5 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 86 |
| 327 | } | - |
| 328 | | - |
| void QReadWriteLockbool QReadWriteLockPrivate::unlock() | |
| { | |
| QMutexLocker lockrecursiveLockForWrite(&d->mutex);int timeout) | |
| 330 | { | - |
| 331 | ((!(d->accessCount != 0recursive)) ? qt_assert_xqt_assert("QReadWriteLock::unlock()", "Cannot unlock an unlocked lock""recursive",__FILE__,410559) : qt_noop()); | - |
| 332 | bool unlockedQMutexLocker lock(&mutex); | - |
| 333 | | - |
| 334 | Qt::HANDLE self = false;QThread::currentThreadId(); | - |
| 335 | if (d->accessCount > 0currentWriter == self| TRUE | evaluated 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 64 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) { | 12-64 |
| 336 | writerCount++; | - |
| 337 | returnexecuted 12 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 12 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 12 |
| 338 | } | - |
| 339 | | - |
| 340 | if (!lockForWrite| TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 42 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
(d->timeout)| TRUE | evaluated 22 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 42 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | 22-42 |
| 341 | returnexecuted 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
false;executed 22 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 22 |
| 342 | | - |
| 343 | currentWriter = self; | - |
| 344 | returnexecuted 42 times by 8 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
true;executed 42 times by 8 tests: return true;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 42 |
| 345 | } | - |
| 346 | | - |
| 347 | void QReadWriteLockPrivate::recursiveUnlock() | - |
| 348 | { | - |
| 349 | ((!(recursive)) ? qt_assert("recursive",__FILE__,577) {: qt_noop()); | - |
| 350 | QMutexLocker lock(&mutex); | - |
| 351 | | - |
| 352 | Qt::HANDLE self = QThread::currentThreadId(); | - |
| 353 | QHash<Qt::HANDLE, int>::iteratorif (self == currentWriter| TRUE | evaluated 54 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| | FALSE | evaluated 105 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 54-105 |
| 354 | if (--| TRUE | evaluated 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 42 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
writerCount > 0| TRUE | evaluated 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 42 times by 8 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
|
) | 12-42 |
| 355 | return;executed 12 times by 2 tests: return;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 12 |
| 356 | currentWriter = 0; | - |
| 357 | }executed 42 times by 8 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
else { | 42 |
| 358 | auto it = d->currentReaders.find(self); | - |
| 359 | if (it != d->== currentReaders.end()| TRUE | never evaluated | | FALSE | evaluated 105 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 0-105 |
| 360 | QMessageLogger(__FILE__, 588, __PRETTY_FUNCTION__).warning("QReadWriteLock::unlock: unlocking from a thread that did not lock"); | - |
| 361 | return; never executed: return; | 0 |
| 362 | } else { | - |
| 363 | if (--| TRUE | evaluated 86 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
it.value() <= 0| TRUE | evaluated 86 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) d->{ | 19-86 |
| 364 | currentReaders.erase(it); | - |
| 365 | readerCount--; | - |
| 366 | }executed 86 times by 5 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 86 |
| 367 | if (readerCount| TRUE | evaluated 19 times by 4 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 86 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 19-86 |
| 368 | return;executed 19 times by 4 tests: return;Executed by:- tst_QAbstractFileEngine
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 19 |
| 369 | }executed 86 times by 5 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 86 |
| 370 | unlocked} | - |
| 371 | | - |
| 372 | unlock(); | - |
| 373 | }executed 128 times by 8 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 128 |
| 374 | | - |
| 375 | | - |
| 376 | namespace { | - |
| 377 | struct FreeListConstants : QFreeListDefaultConstants { | - |
| 378 | enum { BlockCount = --d->accessCount == 04, MaxIndex=0xffff }; | - |
| 379 | static const int Sizes[BlockCount]; | - |
| 380 | }; | - |
| 381 | const int FreeListConstants::Sizes[FreeListConstants::BlockCount] = { | - |
| 382 | 16, | - |
| 383 | 128, | - |
| 384 | 1024, | - |
| 385 | FreeListConstants::MaxIndex - (16 + 128 + 1024) | - |
| 386 | }; | - |
| 387 | | - |
| 388 | typedef QFreeList<QReadWriteLockPrivate, FreeListConstants> FreeList; | - |
| } elsenamespace { namespace Q_QGS_freelist { typedef FreeList Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (d->accessCount < 0 && ++d->accessCountguard.load()| TRUE | evaluated 3 times by 3 testsEvaluated by:- tst_qmetatype - unknown status
- tst_qreadwritelock - unknown status
- tst_qwaitcondition - unknown status
| | FALSE | never evaluated |
== 0QtGlobalStatic::Initialized| TRUE | evaluated 3 times by 3 testsEvaluated by:- tst_qmetatype - unknown status
- tst_qreadwritelock - unknown status
- tst_qwaitcondition - unknown status
| | FALSE | never evaluated |
) guard.store(QtGlobalStatic::Destroyed);executed 3 times by 3 tests: guard.store(QtGlobalStatic::Destroyed);Executed by:- tst_qmetatype - unknown status
- tst_qreadwritelock - unknown status
- tst_qwaitcondition - unknown status
}executed 3 times by 3 tests: end of blockExecuted by:- tst_qmetatype - unknown status
- tst_qreadwritelock - unknown status
- tst_qwaitcondition - unknown status
}; static struct Holder : public HolderBase { unlocked = trueType value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnexecuted 354 times by 3 tests: return &holder.value;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
&holder.valueexecuted 354 times by 3 tests: return &holder.value;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
;executed 354 times by 3 tests: return &holder.value;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
} } } static QGlobalStatic<FreeList, Q_QGS_freelist::innerFunction, Q_QGS_freelist::guard> freelist;; | |
| 390 | } | - |
| 391 | | - |
| 392 | QReadWriteLockPrivate *QReadWriteLockPrivate::allocate() | - |
| 393 | { | - |
| 394 | int i = freelist->next(); | - |
| 395 | QReadWriteLockPrivate *d = &(*freelist)[i]; | - |
| 396 | d->currentWriterid = 0i; | - |
| 397 | } | - |
| | |
| if (unlocked) { | |
| if((!(!d->recursive)) ? qt_assert("!d->waitingWritersrecursive",__FILE__,625) {: qt_noop()); | |
| 398 | ((!(!d->writerWait.wakeOne(); | - |
| } else ifwaitingReaders && !d->waitingReaders && !d->readerCount && !d->writerCount)) ? qt_assert("!d->waitingReaders) { && !d->readerWait.wakeAll(); | |
| }waitingReaders && !d->readerCount && !d->writerCount",__FILE__,626) : qt_noop()); | |
| 399 | returnexecuted 118 times by 3 tests: return d;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
d;executed 118 times by 3 tests: return d;Executed by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 118 |
| 400 | } | - |
| 401 | | - |
| 402 | void QReadWriteLockPrivate::release() | - |
| 403 | { | - |
| 404 | ((!(!recursive)) ? qt_assert("!recursive",__FILE__,632) : qt_noop()); | - |
| 405 | ((!(!waitingReaders && !waitingReaders && !readerCount && !writerCount)) ? qt_assert("!waitingReaders && !waitingReaders && !readerCount && !writerCount",__FILE__,633) : qt_noop()); | - |
| 406 | freelist->release(id); | - |
| 407 | }executed 118 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 118 |
| 408 | | - |
| | |