diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-04 10:41:56 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-17 12:02:49 +0200 |
commit | 77d812683f0ad595606f9833613dd49bb2fda26d (patch) | |
tree | c1fb2f4a3e680db9c5597574fe8684571da0e0f5 /tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | |
parent | f76530a6171ca417865863b66e3ea439c27d057e (diff) |
Refactor QMutexLocker to be able to handle recursive mutexes
Since we're going to split QMutex and QRecursiveMutex into
separate classes, make sure QMutexLocker is prepared for that.
Change-Id: Id5e9a955d1db7c8ee663dd3811ad6448dad0aeae
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp')
-rw-r--r-- | tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 8f8e8300a1..b0b19471e1 100644 --- a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -103,7 +103,7 @@ void tst_QReadWriteLock::uncontended_data() QTest::addColumn<FunctionPtrHolder>("holder"); QTest::newRow("nothing") << FunctionPtrHolder(testUncontended<int, FakeLock>); - QTest::newRow("QMutex") << FunctionPtrHolder(testUncontended<QMutex, QMutexLocker>); + QTest::newRow("QMutex") << FunctionPtrHolder(testUncontended<QMutex, QMutexLocker<QMutex>>); QTest::newRow("QReadWriteLock, read") << FunctionPtrHolder(testUncontended<QReadWriteLock, QReadLocker>); QTest::newRow("QReadWriteLock, write") @@ -173,7 +173,7 @@ void tst_QReadWriteLock::readOnly_data() QTest::addColumn<FunctionPtrHolder>("holder"); QTest::newRow("nothing") << FunctionPtrHolder(testReadOnly<int, FakeLock>); - QTest::newRow("QMutex") << FunctionPtrHolder(testReadOnly<QMutex, QMutexLocker>); + QTest::newRow("QMutex") << FunctionPtrHolder(testReadOnly<QMutex, QMutexLocker<QMutex>>); QTest::newRow("QReadWriteLock") << FunctionPtrHolder(testReadOnly<QReadWriteLock, QReadLocker>); QTest::newRow("std::mutex") << FunctionPtrHolder( testReadOnly<std::mutex, LockerWrapper<std::unique_lock<std::mutex>>>); @@ -234,7 +234,7 @@ void tst_QReadWriteLock::writeOnly_data() QTest::addColumn<FunctionPtrHolder>("holder"); // QTest::newRow("nothing") << FunctionPtrHolder(testWriteOnly<int, FakeLock>); - QTest::newRow("QMutex") << FunctionPtrHolder(testWriteOnly<QMutex, QMutexLocker>); + QTest::newRow("QMutex") << FunctionPtrHolder(testWriteOnly<QMutex, QMutexLocker<QMutex>>); QTest::newRow("QReadWriteLock") << FunctionPtrHolder(testWriteOnly<QReadWriteLock, QWriteLocker>); QTest::newRow("std::mutex") << FunctionPtrHolder( testWriteOnly<std::mutex, LockerWrapper<std::unique_lock<std::mutex>>>); |