[net] Add cs_vSend lock annotations

This commit is contained in:
John Newbery 2020-12-27 09:28:04 +00:00
parent 673254515a
commit 378aedc452

View File

@ -857,8 +857,10 @@ public:
// socket // socket
std::atomic<ServiceFlags> nServices{NODE_NONE}; std::atomic<ServiceFlags> nServices{NODE_NONE};
SOCKET hSocket GUARDED_BY(cs_hSocket); SOCKET hSocket GUARDED_BY(cs_hSocket);
size_t nSendSize{0}; // total size of all vSendMsg entries /** Total size of all vSendMsg entries */
size_t nSendOffset{0}; // offset inside the first vSendMsg already sent size_t nSendSize GUARDED_BY(cs_vSend){0};
/** Offset inside the first vSendMsg already sent */
size_t nSendOffset GUARDED_BY(cs_vSend){0};
uint64_t nSendBytes GUARDED_BY(cs_vSend){0}; uint64_t nSendBytes GUARDED_BY(cs_vSend){0};
std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend); std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
RecursiveMutex cs_vSend; RecursiveMutex cs_vSend;
@ -989,7 +991,7 @@ public:
Network ConnectedThroughNetwork() const; Network ConnectedThroughNetwork() const;
protected: protected:
mapMsgCmdSize mapSendBytesPerMsgCmd; mapMsgCmdSize mapSendBytesPerMsgCmd GUARDED_BY(cs_vSend);
mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv); mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv);
public: public: