From 2b3373c1520aa0b41277cd89956224e08cbd79dd Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 20 May 2022 13:31:08 +0200 Subject: refactor: Propagate negative `!m_tx_relay_mutex` capability Could be verified with $ ./configure CC=clang CXX=clang++ CXXFLAGS='-Wthread-safety -Wthread-safety-negative' $ make clean $ make 2>&1 | grep m_tx_relay_mutex --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/net_processing.cpp b/src/net_processing.cpp index a20bc7167e..7aa1c05241 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -283,7 +283,7 @@ struct Peer { }; /* Initializes a TxRelay struct for this peer. Can be called at most once for a peer. */ - TxRelay* SetTxRelay() + TxRelay* SetTxRelay() EXCLUSIVE_LOCKS_REQUIRED(!m_tx_relay_mutex) { LOCK(m_tx_relay_mutex); Assume(!m_tx_relay); -- cgit v1.2.3