| 273 | |
| 274 | template <typename MutexType> |
| 275 | void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) |
| 276 | { |
| 277 | if (LockHeld(cs)) return; |
| 278 | tfm::format(std::cerr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld()); |
| 279 | abort(); |
| 280 | } |
| 281 | template void AssertLockHeldInternal(const char*, const char*, int, Mutex*); |
| 282 | template void AssertLockHeldInternal(const char*, const char*, int, RecursiveMutex*); |
| 283 |