qmutex_linux.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/thread/qmutex_linux.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14static QBasicAtomicInt futexFlagSupport = { -1 };-
15-
16static int checkFutexPrivateSupport()-
17{-
18 int value = 0;-
19-
20-
21-
22 static_assert(bool(128 != 0x80000000), "FUTEX_PRIVATE_FLAG != 0x80000000");-
23-
24-
25-
26-
27 value = syscall(202, &futexFlagSupport,-
28 1 | 128,-
29 42, 0, 0, 0);-
30 if (value != -1
value != -1Description
TRUEevaluated 1213 times by 539 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
)
0-1213
31 value = 128;
executed 1213 times by 539 tests: value = 128;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1213
32 else-
33 value = 0;
never executed: value = 0;
0
34-
35-
36-
37-
38 futexFlagSupport.store(value);-
39 return
executed 1213 times by 539 tests: return value;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
value;
executed 1213 times by 539 tests: return value;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1213
40}-
41-
42static inline int futexFlags()-
43{-
44 int value = futexFlagSupport.load();-
45 if (__builtin_expect(!!(value != -1), true)
__builtin_expe... != -1), true)Description
TRUEevaluated 11958923 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEevaluated 1213 times by 539 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
1213-11958923
46 return
executed 11958923 times by 1007 tests: return value;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
value;
executed 11958923 times by 1007 tests: return value;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
11958923
47 return
executed 1213 times by 539 tests: return checkFutexPrivateSupport();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
checkFutexPrivateSupport();
executed 1213 times by 539 tests: return checkFutexPrivateSupport();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1213
48}-
49-
50static inline int _q_futex(void *addr, int op, int val, const struct timespec *timeout) noexcept-
51{-
52 volatile int *int_addr = reinterpret_cast<volatile int *>(addr);-
53-
54-
55-
56 int *addr2 = 0;-
57 int val2 = 0;-
58-
59-
60-
61 return
executed 11960136 times by 1007 tests: return syscall(202, int_addr, op | futexFlags(), val, timeout, addr2, val2);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
syscall(202, int_addr, op | futexFlags(), val, timeout, addr2, val2);
executed 11960136 times by 1007 tests: return syscall(202, int_addr, op | futexFlags(), val, timeout, addr2, val2);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
11960136
62}-
63-
64static inline QMutexData *dummyFutexValue()-
65{-
66 return
executed 11966133 times by 1007 tests: return reinterpret_cast<QMutexData *>(quintptr(3));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
reinterpret_cast<QMutexData *>(quintptr(3));
executed 11966133 times by 1007 tests: return reinterpret_cast<QMutexData *>(quintptr(3));
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
11966133
67}-
68-
69template <bool IsTimed> static inline-
70bool lockInternal_helper(QBasicAtomicPointer<QMutexData> &d_ptr, int timeout = -1, QElapsedTimer *elapsedTimer = 0) noexcept-
71{-
72 if (!IsTimed
!IsTimedDescription
TRUEevaluated 3986484 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEevaluated 102449 times by 12 tests
Evaluated by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
)
102449-3986484
73 timeout = -1;
executed 3986484 times by 1007 tests: timeout = -1;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
3986484
74-
75-
76 if (timeout == 0
timeout == 0Description
TRUEevaluated 100170 times by 12 tests
Evaluated by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
FALSEevaluated 3988763 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
100170-3988763
77 return
executed 100170 times by 12 tests: return false;
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
false;
executed 100170 times by 12 tests: return false;
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
100170
78-
79 struct timespec ts, *pts = 0;-
80 if (IsTimed
IsTimedDescription
TRUEevaluated 2279 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 3986484 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
&& timeout > 0
timeout > 0Description
TRUEevaluated 2275 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMutex
) {
4-3986484
81 ts.tv_sec = timeout / 1000;-
82 ts.tv_nsec = (timeout % 1000) * 1000 * 1000;-
83 }
executed 2275 times by 1 test: end of block
Executed by:
  • tst_QMutex
2275
84-
85-
86 while (d_ptr.fetchAndStoreAcquire(dummyFutexValue()) != 0
d_ptr.fetchAnd...xValue()) != 0Description
TRUEevaluated 3989428 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEevaluated 3987317 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
) {
3987317-3989428
87 if (IsTimed
IsTimedDescription
TRUEevaluated 2340 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 3987088 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
&& pts == &ts
pts == &tsDescription
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 2279 times by 1 test
Evaluated by:
  • tst_QMutex
) {
61-3987088
88-
89 qint64 xtimeout = qint64(timeout) * 1000 * 1000;-
90 xtimeout -= elapsedTimer->nsecsElapsed();-
91 if (xtimeout <= 0
xtimeout <= 0Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_QMutex
) {
21-40
92-
93 return
executed 40 times by 1 test: return false;
Executed by:
  • tst_QMutex
false;
executed 40 times by 1 test: return false;
Executed by:
  • tst_QMutex
40
94 }-
95 ts.tv_sec = xtimeout / static_cast<long long>(1000LL) / 1000 / 1000;-
96 ts.tv_nsec = xtimeout % (static_cast<long long>(1000LL) * 1000 * 1000);-
97 }
executed 21 times by 1 test: end of block
Executed by:
  • tst_QMutex
21
98 if (IsTimed
IsTimedDescription
TRUEevaluated 2300 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 3987088 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
&& timeout > 0
timeout > 0Description
TRUEevaluated 2296 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMutex
)
4-3987088
99 pts = &ts;
executed 2296 times by 1 test: pts = &ts;
Executed by:
  • tst_QMutex
2296
100-
101-
102 int r = _q_futex(&d_ptr, 0, quintptr(dummyFutexValue()), pts);-
103 if (IsTimed
IsTimedDescription
TRUEevaluated 2300 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 3987088 times by 1007 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
&& r != 0
r != 0Description
TRUEevaluated 1406 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEevaluated 894 times by 1 test
Evaluated by:
  • tst_QMutex
&& (*
(*__errno_location ()) == 110Description
TRUEevaluated 1406 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEnever evaluated
__errno_location ()) == 110
(*__errno_location ()) == 110Description
TRUEevaluated 1406 times by 1 test
Evaluated by:
  • tst_QMutex
FALSEnever evaluated
)
0-3987088
104 return
executed 1406 times by 1 test: return false;
Executed by:
  • tst_QMutex
false;
executed 1406 times by 1 test: return false;
Executed by:
  • tst_QMutex
1406
105-
106-
107-
108-
109 }
executed 3987982 times by 1007 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
3987982
110-
111 ((!(d_ptr.load())) ? qt_assert("d_ptr.load()",__FILE__,196) : qt_noop());-
112 return
executed 3987317 times by 1007 tests: return true;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
true;
executed 3987317 times by 1007 tests: return true;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
3987317
113}-
114-
115void QBasicMutex::lockInternal() noexcept-
116{-
117 ((!(!isRecursive())) ? qt_assert("!isRecursive()",__FILE__,202) : qt_noop());-
118 lockInternal_helper<false>(d_ptr);-
119}
executed 3986484 times by 1007 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
3986484
120-
121bool QBasicMutex::lockInternal(int timeout) noexcept-
122{-
123 ((!(!isRecursive())) ? qt_assert("!isRecursive()",__FILE__,208) : qt_noop());-
124 QElapsedTimer elapsedTimer;-
125 elapsedTimer.start();-
126 return
executed 102449 times by 12 tests: return lockInternal_helper<true>(d_ptr, timeout, &elapsedTimer);
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
lockInternal_helper<true>(d_ptr, timeout, &elapsedTimer);
executed 102449 times by 12 tests: return lockInternal_helper<true>(d_ptr, timeout, &elapsedTimer);
Executed by:
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QHttpSocketEngine
  • tst_QMutex
  • tst_QMutexLocker
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
102449
127}-
128-
129void QBasicMutex::unlockInternal() noexcept-
130{-
131 QMutexData *d = d_ptr.load();-
132 ((!(d)) ? qt_assert("d",__FILE__,217) : qt_noop());-
133 ((!(d != dummyLocked())) ? qt_assert("d != dummyLocked()",__FILE__,218) : qt_noop());-
134 (void)d;;-
135 ((!(!isRecursive())) ? qt_assert("!isRecursive()",__FILE__,220) : qt_noop());-
136-
137 d_ptr.storeRelease(0);-
138 _q_futex(&d_ptr, 1, 1, 0);-
139}
executed 7970181 times by 1008 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
7970181
140-
141-
142-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9