Use LOCK macros for non-recursive locks

Instead of std::unique_lock.
This commit is contained in:
Russell Yanofsky
2017-11-08 17:07:40 -05:00
parent 1382913e61
commit 9c4dc597dd
11 changed files with 26 additions and 24 deletions

View File

@@ -2064,7 +2064,7 @@ void CConnman::ThreadMessageHandler()
pnode->Release();
}
std::unique_lock<std::mutex> lock(mutexMsgProc);
WAIT_LOCK(mutexMsgProc, lock);
if (!fMoreWork) {
condMsgProc.wait_until(lock, std::chrono::steady_clock::now() + std::chrono::milliseconds(100), [this] { return fMsgProcWake; });
}
@@ -2346,7 +2346,7 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
flagInterruptMsgProc = false;
{
std::unique_lock<std::mutex> lock(mutexMsgProc);
LOCK(mutexMsgProc);
fMsgProcWake = false;
}