aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2019-05-30 13:44:02 +1000
committerAnthony Towns <aj@erisian.com.au>2020-05-19 16:33:10 +1000
commit8b5af3d4c1270267ad85e78f661bf8fab06f3aad (patch)
treefb51d32074cfe24c9f92bfc6bf7c21069cbeda10 /src/net.cpp
parentde7c5f41aba860751ef7824245e6d9d5088a1200 (diff)
net: fMsgProcWake use LOCK instead of lock_guard
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp
index dcc613ba88..4e80e123d1 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1454,7 +1454,7 @@ void CConnman::ThreadSocketHandler()
void CConnman::WakeMessageHandler()
{
{
- std::lock_guard<std::mutex> lock(mutexMsgProc);
+ LOCK(mutexMsgProc);
fMsgProcWake = true;
}
condMsgProc.notify_one();
@@ -2057,7 +2057,7 @@ void CConnman::ThreadMessageHandler()
WAIT_LOCK(mutexMsgProc, lock);
if (!fMoreWork) {
- condMsgProc.wait_until(lock, std::chrono::steady_clock::now() + std::chrono::milliseconds(100), [this] { return fMsgProcWake; });
+ condMsgProc.wait_until(lock, std::chrono::steady_clock::now() + std::chrono::milliseconds(100), [this]() EXCLUSIVE_LOCKS_REQUIRED(mutexMsgProc) { return fMsgProcWake; });
}
fMsgProcWake = false;
}
@@ -2366,7 +2366,7 @@ static CNetCleanup instance_of_cnetcleanup;
void CConnman::Interrupt()
{
{
- std::lock_guard<std::mutex> lock(mutexMsgProc);
+ LOCK(mutexMsgProc);
flagInterruptMsgProc = true;
}
condMsgProc.notify_all();