fix: don't use non-existent PrintLockContention in SharedEnter

`PrintLockContention` hasn't existed since dash#6046
This commit is contained in:
Kittywhiskers Van Gogh 2024-11-17 16:04:28 +00:00
parent f331cbe8c8
commit a9cfbd1048
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -256,13 +256,10 @@ private:
{ {
EnterCritical(pszName, pszFile, nLine, Base::mutex()); EnterCritical(pszName, pszFile, nLine, Base::mutex());
#ifdef DEBUG_LOCKCONTENTION #ifdef DEBUG_LOCKCONTENTION
if (!Base::try_lock()) { if (Base::try_lock()) return;
PrintLockContention(pszName, pszFile, nLine); LOG_TIME_MICROS_WITH_CATEGORY(strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine), BCLog::LOCK);
#endif #endif
Base::lock(); Base::lock();
#ifdef DEBUG_LOCKCONTENTION
}
#endif
} }
bool TrySharedEnter(const char* pszName, const char* pszFile, int nLine) bool TrySharedEnter(const char* pszName, const char* pszFile, int nLine)