| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | QReadWriteLock::QReadWriteLock(RecursionMode recursionMode) | - |
| 7 | : d(new QReadWriteLockPrivate(recursionMode)) | - |
| 8 | { }executed 39003 times by 297 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
- ...
| 39003 |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | QReadWriteLock::~QReadWriteLock() | - |
| 17 | { | - |
| 18 | delete d; | - |
| 19 | }executed 39976 times by 552 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
- ...
| 39976 |
| 20 | void QReadWriteLock::lockForRead() | - |
| 21 | { | - |
| 22 | QMutexLocker lock(&d->mutex); | - |
| 23 | | - |
| 24 | Qt::HANDLE self = 0; | - |
| 25 | if (d->recursive| TRUE | evaluated 90 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1685730 times by 357 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
- ...
|
) { | 90-1685730 |
| 26 | self = QThread::currentThreadId(); | - |
| 27 | | - |
| 28 | QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self); | - |
| 29 | if (it != d->currentReaders.end()| TRUE | evaluated 8 times by 2 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QFile
| | FALSE | evaluated 82 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 8-82 |
| 30 | ++it.value(); | - |
| 31 | ++d->accessCount; | - |
| 32 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::lockForRead()", "Overflow in lock counter", | - |
| 33 | __FILE__ | - |
| 34 | , | - |
| 35 | 148 | - |
| 36 | ) : qt_noop()) | - |
| 37 | ; | - |
| 38 | return;executed 8 times by 2 tests: return;Executed by:- tst_QAbstractFileEngine
- tst_QFile
| 8 |
| 39 | } | - |
| 40 | }executed 82 times by 5 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 82 |
| 41 | | - |
| 42 | while (d->accessCount < 0| TRUE | evaluated 61 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1686319 times by 357 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
- ...
|
|| d->waitingWriters| TRUE | evaluated 507 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
| | FALSE | evaluated 1685812 times by 357 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
- ...
|
) { | 61-1686319 |
| 43 | ++d->waitingReaders; | - |
| 44 | d->readerWait.wait(&d->mutex); | - |
| 45 | --d->waitingReaders; | - |
| 46 | }executed 568 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 568 |
| 47 | if (d->recursive| TRUE | evaluated 82 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1685730 times by 357 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
- ...
|
) | 82-1685730 |
| 48 | d->currentReaders.insert(self, 1);executed 82 times by 5 tests: d->currentReaders.insert(self, 1);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 82 |
| 49 | | - |
| 50 | ++d->accessCount; | - |
| 51 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::lockForRead()", "Overflow in lock counter",__FILE__,162) : qt_noop()); | - |
| 52 | }executed 1685812 times by 357 tests: end of blockExecuted 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
- ...
| 1685812 |
| 53 | bool QReadWriteLock::tryLockForRead() | - |
| 54 | { | - |
| 55 | QMutexLocker lock(&d->mutex); | - |
| 56 | | - |
| 57 | Qt::HANDLE self = 0; | - |
| 58 | if (d->recursive| TRUE | evaluated 36 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 7 times by 1 test |
) { | 7-36 |
| 59 | self = QThread::currentThreadId(); | - |
| 60 | | - |
| 61 | QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self); | - |
| 62 | if (it != d->currentReaders.end()| TRUE | evaluated 11 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 25 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 11-25 |
| 63 | ++it.value(); | - |
| 64 | ++d->accessCount; | - |
| 65 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::tryLockForRead()", "Overflow in lock counter", | - |
| 66 | __FILE__ | - |
| 67 | , | - |
| 68 | 194 | - |
| 69 | ) : qt_noop()) | - |
| 70 | ; | - |
| 71 | returnexecuted 11 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 11 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 11 |
| 72 | } | - |
| 73 | }executed 25 times by 2 tests: end of blockExecuted by:- tst_QReadWriteLock
- tst_QWaitCondition
| 25 |
| 74 | | - |
| 75 | if (d->accessCount < 0| TRUE | evaluated 23 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 9 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
|
) | 9-23 |
| 76 | returnexecuted 23 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
false;executed 23 times by 2 tests: return false;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 23 |
| 77 | if (d->recursive| TRUE | evaluated 4 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 5 times by 1 test |
) | 4-5 |
| 78 | d->currentReaders.insert(self, 1);executed 4 times by 2 tests: d->currentReaders.insert(self, 1);Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 4 |
| 79 | | - |
| 80 | ++d->accessCount; | - |
| 81 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::tryLockForRead()", "Overflow in lock counter",__FILE__,205) : qt_noop()); | - |
| 82 | | - |
| 83 | returnexecuted 9 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
true;executed 9 times by 2 tests: return true;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 9 |
| 84 | } | - |
| 85 | bool QReadWriteLock::tryLockForRead(int timeout) | - |
| 86 | { | - |
| 87 | QMutexLocker lock(&d->mutex); | - |
| 88 | | - |
| 89 | Qt::HANDLE self = 0; | - |
| 90 | if (d->recursive| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
) { | 0-3 |
| 91 | self = QThread::currentThreadId(); | - |
| 92 | | - |
| 93 | QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self); | - |
| 94 | if (it != d->currentReaders.end()| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 95 | ++it.value(); | - |
| 96 | ++d->accessCount; | - |
| 97 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::tryLockForRead()", "Overflow in lock counter", | - |
| 98 | __FILE__ | - |
| 99 | , | - |
| 100 | 242 | - |
| 101 | ) : qt_noop()) | - |
| 102 | ; | - |
| 103 | return never executed: return true; true;never executed: return true; | 0 |
| 104 | } | - |
| 105 | } never executed: end of block | 0 |
| 106 | | - |
| 107 | while (d->accessCount < 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 2 times by 1 test |
|| d->waitingWriters| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) { | 0-2 |
| 108 | ++d->waitingReaders; | - |
| 109 | bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? (9223372036854775807L * 2UL + 1UL) : ulong(timeout)); | - |
| 110 | --d->waitingReaders; | - |
| 111 | if (!success| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 112 | returnexecuted 1 time by 1 test: return false; false;executed 1 time by 1 test: return false; | 1 |
| 113 | } never executed: end of block | 0 |
| 114 | if (d->recursive| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) | 0-2 |
| 115 | d->currentReaders.insert(self, 1); never executed: d->currentReaders.insert(self, 1); | 0 |
| 116 | | - |
| 117 | ++d->accessCount; | - |
| 118 | ((!(d->accessCount > 0)) ? qt_assert_x("QReadWriteLock::tryLockForRead()", "Overflow in lock counter",__FILE__,258) : qt_noop()); | - |
| 119 | | - |
| 120 | returnexecuted 2 times by 1 test: return true; true;executed 2 times by 1 test: return true; | 2 |
| 121 | } | - |
| 122 | void QReadWriteLock::lockForWrite() | - |
| 123 | { | - |
| 124 | QMutexLocker lock(&d->mutex); | - |
| 125 | | - |
| 126 | Qt::HANDLE self = 0; | - |
| 127 | if (d->recursive| TRUE | evaluated 37 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 330454 times by 559 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- 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
- tst_QButtonGroup
- ...
|
) { | 37-330454 |
| 128 | self = QThread::currentThreadId(); | - |
| 129 | | - |
| 130 | if (d->currentWriter == self| TRUE | never evaluated | | FALSE | evaluated 37 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
|
) { | 0-37 |
| 131 | --d->accessCount; | - |
| 132 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::lockForWrite()", "Overflow in lock counter", | - |
| 133 | __FILE__ | - |
| 134 | , | - |
| 135 | 285 | - |
| 136 | ) : qt_noop()) | - |
| 137 | ; | - |
| 138 | return; never executed: return; | 0 |
| 139 | } | - |
| 140 | }executed 37 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
| 37 |
| 141 | | - |
| 142 | while (d->accessCount != 0| TRUE | evaluated 261 times by 5 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusThreading
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 330491 times by 563 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
|
) { | 261-330491 |
| 143 | ++d->waitingWriters; | - |
| 144 | d->writerWait.wait(&d->mutex); | - |
| 145 | --d->waitingWriters; | - |
| 146 | }executed 261 times by 5 tests: end of blockExecuted by:- tst_QDBusConnection
- tst_QDBusThreading
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 261 |
| 147 | if (d->recursive| TRUE | evaluated 37 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 330454 times by 559 testsEvaluated by:- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- 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
- tst_QButtonGroup
- ...
|
) | 37-330454 |
| 148 | d->currentWriter = self;executed 37 times by 8 tests: d->currentWriter = self;Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_qabstractfileengine - unknown status
- tst_qdiriterator - unknown status
- tst_qfile - unknown status
| 37 |
| 149 | | - |
| 150 | --d->accessCount; | - |
| 151 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::lockForWrite()", "Overflow in lock counter",__FILE__,299) : qt_noop()); | - |
| 152 | }executed 330491 times by 563 tests: end of blockExecuted 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| 330491 |
| 153 | bool QReadWriteLock::tryLockForWrite() | - |
| 154 | { | - |
| 155 | QMutexLocker lock(&d->mutex); | - |
| 156 | | - |
| 157 | Qt::HANDLE self = 0; | - |
| 158 | if (d->recursive| TRUE | evaluated 39 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 23 times by 3 testsEvaluated by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWriteLocker
|
) { | 23-39 |
| 159 | self = QThread::currentThreadId(); | - |
| 160 | | - |
| 161 | if (d->currentWriter == self| TRUE | evaluated 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 27 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 12-27 |
| 162 | --d->accessCount; | - |
| 163 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::lockForWrite()", "Overflow in lock counter", | - |
| 164 | __FILE__ | - |
| 165 | , | - |
| 166 | 328 | - |
| 167 | ) : qt_noop()) | - |
| 168 | ; | - |
| 169 | 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 |
| 170 | } | - |
| 171 | }executed 27 times by 2 tests: end of blockExecuted by:- tst_QReadWriteLock
- tst_QWaitCondition
| 27 |
| 172 | | - |
| 173 | if (d->accessCount != 0| TRUE | evaluated 32 times by 4 testsEvaluated by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| | FALSE | evaluated 18 times by 4 testsEvaluated by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
|
) | 18-32 |
| 174 | returnexecuted 32 times by 4 tests: return false;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
false;executed 32 times by 4 tests: return false;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| 32 |
| 175 | if (d->recursive| TRUE | evaluated 5 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 13 times by 3 testsEvaluated by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWriteLocker
|
) | 5-13 |
| 176 | d->currentWriter = self;executed 5 times by 2 tests: d->currentWriter = self;Executed by:- tst_QReadWriteLock
- tst_QWaitCondition
| 5 |
| 177 | | - |
| 178 | --d->accessCount; | - |
| 179 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::tryLockForWrite()", "Overflow in lock counter", | - |
| 180 | __FILE__ | - |
| 181 | , | - |
| 182 | 340 | - |
| 183 | ) : qt_noop()) | - |
| 184 | ; | - |
| 185 | | - |
| 186 | returnexecuted 18 times by 4 tests: return true;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
true;executed 18 times by 4 tests: return true;Executed by:- tst_QReadLocker
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_QWriteLocker
| 18 |
| 187 | } | - |
| 188 | bool QReadWriteLock::tryLockForWrite(int timeout) | - |
| 189 | { | - |
| 190 | QMutexLocker lock(&d->mutex); | - |
| 191 | | - |
| 192 | Qt::HANDLE self = 0; | - |
| 193 | if (d->recursive| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) { | 0-2 |
| 194 | self = QThread::currentThreadId(); | - |
| 195 | | - |
| 196 | if (d->currentWriter == self| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 197 | --d->accessCount; | - |
| 198 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::lockForWrite()", "Overflow in lock counter", | - |
| 199 | __FILE__ | - |
| 200 | , | - |
| 201 | 375 | - |
| 202 | ) : qt_noop()) | - |
| 203 | ; | - |
| 204 | return never executed: return true; true;never executed: return true; | 0 |
| 205 | } | - |
| 206 | } never executed: end of block | 0 |
| 207 | | - |
| 208 | while (d->accessCount != 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 1 time by 1 test |
) { | 1 |
| 209 | ++d->waitingWriters; | - |
| 210 | bool success = d->writerWait.wait(&d->mutex, timeout < 0 ? (9223372036854775807L * 2UL + 1UL) : ulong(timeout)); | - |
| 211 | --d->waitingWriters; | - |
| 212 | | - |
| 213 | if (!success| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 214 | returnexecuted 1 time by 1 test: return false; false;executed 1 time by 1 test: return false; | 1 |
| 215 | } never executed: end of block | 0 |
| 216 | if (d->recursive| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 217 | d->currentWriter = self; never executed: d->currentWriter = self; | 0 |
| 218 | | - |
| 219 | --d->accessCount; | - |
| 220 | ((!(d->accessCount < 0)) ? qt_assert_x("QReadWriteLock::tryLockForWrite()", "Overflow in lock counter", | - |
| 221 | __FILE__ | - |
| 222 | , | - |
| 223 | 393 | - |
| 224 | ) : qt_noop()) | - |
| 225 | ; | - |
| 226 | | - |
| 227 | returnexecuted 1 time by 1 test: return true; true;executed 1 time by 1 test: return true; | 1 |
| 228 | } | - |
| 229 | void QReadWriteLock::unlock() | - |
| 230 | { | - |
| 231 | QMutexLocker lock(&d->mutex); | - |
| 232 | | - |
| 233 | ((!(d->accessCount != 0)) ? qt_assert_x("QReadWriteLock::unlock()", "Cannot unlock an unlocked lock",__FILE__,410) : qt_noop()); | - |
| 234 | | - |
| 235 | bool unlocked = false; | - |
| 236 | if (d->accessCount > 0| TRUE | evaluated 1685842 times by 357 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 330522 times by 564 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
|
) { | 330522-1685842 |
| 237 | | - |
| 238 | if (d->recursive| TRUE | evaluated 105 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1685737 times by 357 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
- ...
|
) { | 105-1685737 |
| 239 | Qt::HANDLE self = QThread::currentThreadId(); | - |
| 240 | QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self); | - |
| 241 | if (it != d->currentReaders.end()| TRUE | evaluated 105 times by 5 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | never evaluated |
) { | 0-105 |
| 242 | 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
|
) | 19-86 |
| 243 | d->currentReaders.erase(it);executed 86 times by 5 tests: d->currentReaders.erase(it);Executed by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 86 |
| 244 | }executed 105 times by 5 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 105 |
| 245 | }executed 105 times by 5 tests: end of blockExecuted by:- tst_QAbstractFileEngine
- tst_QDirIterator
- tst_QFile
- tst_QReadWriteLock
- tst_QWaitCondition
| 105 |
| 246 | | - |
| 247 | unlocked = --d->accessCount == 0; | - |
| 248 | }executed 1685842 times by 357 tests: end of blockExecuted 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
- ...
else if (d->accessCount < 0| TRUE | evaluated 330522 times by 564 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_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 | never evaluated |
&& ++| TRUE | evaluated 330510 times by 564 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_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 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
|
d->accessCount == 0| TRUE | evaluated 330510 times by 564 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_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 12 times by 2 testsEvaluated by:- tst_QReadWriteLock
- tst_QWaitCondition
|
) { | 0-1685842 |
| 249 | | - |
| 250 | unlocked = true; | - |
| 251 | d->currentWriter = 0; | - |
| 252 | }executed 330510 times by 564 tests: end of blockExecuted 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| 330510 |
| 253 | | - |
| 254 | if (unlocked| TRUE | evaluated 1872432 times by 570 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_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 143932 times by 10 testsEvaluated by:- tst_QAbstractFileEngine
- tst_QDBusConnection
- tst_QDBusThreading
- tst_QFile
- tst_QHttpNetworkConnection
- tst_QMetaType
- tst_QNetworkReply
- tst_QReadWriteLock
- tst_QWaitCondition
- tst_Spdy
|
) { | 143932-1872432 |
| 255 | if (d->waitingWriters| TRUE | evaluated 6953 times by 5 testsEvaluated by:- tst_QDBusConnection
- tst_QDBusThreading
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1865479 times by 570 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
|
) { | 6953-1865479 |
| 256 | d->writerWait.wakeOne(); | - |
| 257 | }executed 6953 times by 5 tests: end of blockExecuted by:- tst_QDBusConnection
- tst_QDBusThreading
- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
else if (d->waitingReaders| TRUE | evaluated 217 times by 3 testsEvaluated by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| | FALSE | evaluated 1865262 times by 570 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
|
) { | 217-1865262 |
| 258 | d->readerWait.wakeAll(); | - |
| 259 | }executed 217 times by 3 tests: end of blockExecuted by:- tst_QMetaType
- tst_QReadWriteLock
- tst_QWaitCondition
| 217 |
| 260 | }executed 1872432 times by 570 tests: end of blockExecuted 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| 1872432 |
| 261 | }executed 2016364 times by 570 tests: end of blockExecuted 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_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QBackingStore
- tst_QBoxLayout
- ...
| 2016364 |
| 262 | | - |
| | |