| 283 | |
| 284 | template <typename MutexType> |
| 285 | void AssertLockNotHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) |
| 286 | { |
| 287 | if (!LockHeld(cs)) return; |
| 288 | tfm::format(std::cerr, "Assertion failed: lock %s held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld()); |
| 289 | abort(); |
| 290 | } |
| 291 | template void AssertLockNotHeldInternal(const char*, const char*, int, Mutex*); |
| 292 | template void AssertLockNotHeldInternal(const char*, const char*, int, RecursiveMutex*); |
| 293 |