Skip to content

Commit

Permalink
Add Clang thread safety analysis annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Nov 26, 2021
1 parent 5716940 commit e1d12d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ class CConnman
// Network usage totals
RecursiveMutex cs_totalBytesRecv;
RecursiveMutex cs_totalBytesSent;
uint64_t nTotalBytesRecv{0};
uint64_t nTotalBytesSent{0};
uint64_t nTotalBytesRecv GUARDED_BY(cs_totalBytesRecv) = 0;
uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent) = 0;

// Whitelisted ranges. Any node connecting from these is automatically
// whitelisted (as well as those connecting to whitelisted binds).
Expand All @@ -396,7 +396,7 @@ class CConnman
CAddrMan addrman;
std::deque<std::string> vOneShots;
RecursiveMutex cs_vOneShots;
std::vector<std::string> vAddedNodes;
std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes);
RecursiveMutex cs_vAddedNodes;
std::vector<CNode*> vNodes;
std::list<CNode*> vNodesDisconnected;
Expand Down

0 comments on commit e1d12d3

Please sign in to comment.