Changeset View
Changeset View
Standalone View
Standalone View
src/sync.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
struct CLockLocation { | struct CLockLocation { | ||||
CLockLocation(const char *pszName, const char *pszFile, int nLine, | CLockLocation(const char *pszName, const char *pszFile, int nLine, | ||||
bool fTryIn, const std::string &thread_name) | bool fTryIn, const std::string &thread_name) | ||||
: fTry(fTryIn), mutexName(pszName), sourceFile(pszFile), | : fTry(fTryIn), mutexName(pszName), sourceFile(pszFile), | ||||
m_thread_name(thread_name), sourceLine(nLine) {} | m_thread_name(thread_name), sourceLine(nLine) {} | ||||
std::string ToString() const { | std::string ToString() const { | ||||
return strprintf("%s %s:%s%s (in thread %s)", mutexName, sourceFile, | return strprintf("%s %s:%s%s (in thread %s)", mutexName, sourceFile, | ||||
itostr(sourceLine), (fTry ? " (TRY)" : ""), | sourceLine, (fTry ? " (TRY)" : ""), m_thread_name); | ||||
m_thread_name); | |||||
} | } | ||||
std::string Name() const { return mutexName; } | std::string Name() const { return mutexName; } | ||||
private: | private: | ||||
bool fTry; | bool fTry; | ||||
std::string mutexName; | std::string mutexName; | ||||
std::string sourceFile; | std::string sourceFile; | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |