diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-06 08:12:28 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-07 09:41:34 +0100 |
commit | fa210689e27b0d78b2fe894e51e364179db7a3ce (patch) | |
tree | e16fa7470067c2a56adcc5cd44f9f14dcc73f5a4 /src/net.h | |
parent | fa0a71781a964d944db9ecc002675ef32249f62e (diff) |
net: Move SocketSendData lock annotation to header
Also, add lock annotation to SendMessages
Can be reviewed with "--word-diff-regex=."
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -778,7 +778,7 @@ class NetEventsInterface { public: virtual bool ProcessMessages(CNode* pnode, std::atomic<bool>& interrupt) = 0; - virtual bool SendMessages(CNode* pnode) = 0; + virtual bool SendMessages(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(pnode->cs_sendProcessing) = 0; virtual void InitializeNode(CNode* pnode) = 0; virtual void FinalizeNode(const CNode& node, bool& update_connection_time) = 0; @@ -1057,7 +1057,7 @@ private: NodeId GetNewNodeId(); - size_t SocketSendData(CNode *pnode) const; + size_t SocketSendData(CNode& node) const EXCLUSIVE_LOCKS_REQUIRED(node.cs_vSend); void DumpAddresses(); // Network stats |