| 65 | |
| 66 | template <typename MutexType> |
| 67 | void TestInconsistentLockOrderDetected(MutexType& mutex1, MutexType& mutex2) NO_THREAD_SAFETY_ANALYSIS |
| 68 | { |
| 69 | ENTER_CRITICAL_SECTION(mutex1); |
| 70 | ENTER_CRITICAL_SECTION(mutex2); |
| 71 | #ifdef DEBUG_LOCKORDER |
| 72 | BOOST_CHECK_EXCEPTION(LEAVE_CRITICAL_SECTION(mutex1), std::logic_error, HasReason("mutex1 was not most recent critical section locked")); |
| 73 | #endif // DEBUG_LOCKORDER |
| 74 | LEAVE_CRITICAL_SECTION(mutex2); |
| 75 | LEAVE_CRITICAL_SECTION(mutex1); |
| 76 | BOOST_CHECK(LockStackEmpty()); |
| 77 | } |
| 78 | } // namespace |
| 79 | |
| 80 | BOOST_AUTO_TEST_SUITE(sync_tests) |
no test coverage detected