| 43 | |
| 44 | template <typename MutexType> |
| 45 | void TestDoubleLock(bool should_throw) |
| 46 | { |
| 47 | const bool prev = g_debug_lockorder_abort; |
| 48 | g_debug_lockorder_abort = false; |
| 49 | |
| 50 | MutexType m; |
| 51 | ENTER_CRITICAL_SECTION(m); |
| 52 | if (should_throw) { |
| 53 | BOOST_CHECK_EXCEPTION(TestDoubleLock2(m), std::logic_error, |
| 54 | HasReason("double lock detected")); |
| 55 | } else { |
| 56 | BOOST_CHECK_NO_THROW(TestDoubleLock2(m)); |
| 57 | } |
| 58 | LEAVE_CRITICAL_SECTION(m); |
| 59 | |
| 60 | BOOST_CHECK(LockStackEmpty()); |
| 61 | |
| 62 | g_debug_lockorder_abort = prev; |
| 63 | } |
| 64 | #endif /* DEBUG_LOCKORDER */ |
| 65 | |
| 66 | template <typename MutexType> |
nothing calls this directly
no test coverage detected