message: Thread name added to the lock location struct.
diff: #include "util.h"
  #include "utilstrencodings.h"
  +#include "util/threadnames.h"
  #include <stdio.h>
  @@ -37,23 +38,30 @@ void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
  //
  struct CLockLocation {
  - CLockLocation(const char* pszName, const char* pszFile, int nLine, bool fTryIn)
  - {
  - mutexName = pszName;
  - sourceFile = pszFile;
  - sourceLine = nLine;
  - fTry = fTryIn;
  - }
  + CLockLocation(
  + const char* pszName,
  + const char* pszFile,
  + int nLine,
  + bool fTryIn,
  + const std::string& thread_name)
  + : fTry(fTryIn),
  + mutexName(pszName),
  + sourceFile(pszFile),
  + m_thread_name(thread_name),
  + sourceLine(nLine) {}
  std::string ToString() const
  {
  - return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
  + return strprintf(
  + "%s %s:%s%s (in thread %s)",
  + mutexName, sourceFile, itostr(sourceLine), (fTry ? " (TRY)" : ""), m_thread_name);
  }
  private:
  bool fTry;
  std::string mutexName;
  std::string sourceFile;
  + const std::string& m_thread_name;
  int sourceLine;
  };
  @@ -131,7 +139,7 @@ static void pop_lock()
  void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry)
  {
  - push_lock(cs, CLockLocation(pszName, pszFile, nLine, fTry));
  + push_lock(cs, CLockLocation(pszName, pszFile, nLine, fTry, util::ThreadGetInternalName()));
  }
  void LeaveCritical()
  