Changeset View
Changeset View
Standalone View
Standalone View
src/sync.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "sync.h" | #include "sync.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
#include <cstdio> | #include <cstdio> | ||||
#include <set> | #include <set> | ||||
#ifdef DEBUG_LOCKCONTENTION | #ifdef DEBUG_LOCKCONTENTION | ||||
#if !defined(HAVE_THREAD_LOCAL) | |||||
static_assert(false, "thread_local is not supported"); | |||||
#endif | |||||
void PrintLockContention(const char *pszName, const char *pszFile, int nLine) { | void PrintLockContention(const char *pszName, const char *pszFile, int nLine) { | ||||
LogPrintf("LOCKCONTENTION: %s\n", pszName); | LogPrintf("LOCKCONTENTION: %s\n", pszName); | ||||
LogPrintf("Locker: %s:%d\n", pszFile, nLine); | LogPrintf("Locker: %s:%d\n", pszFile, nLine); | ||||
} | } | ||||
#endif /* DEBUG_LOCKCONTENTION */ | #endif /* DEBUG_LOCKCONTENTION */ | ||||
#ifdef DEBUG_LOCKORDER | #ifdef DEBUG_LOCKORDER | ||||
// | // | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |