Browse Source

Add Clang thread safety analysis annotations

0.16
practicalswift 7 years ago
parent
commit
bfb0c0a5b7
  1. 14
      src/net.h

14
src/net.h

@ -370,14 +370,14 @@ private:
// Network usage totals // Network usage totals
CCriticalSection cs_totalBytesRecv; CCriticalSection cs_totalBytesRecv;
CCriticalSection cs_totalBytesSent; CCriticalSection cs_totalBytesSent;
uint64_t nTotalBytesRecv; uint64_t nTotalBytesRecv GUARDED_BY(cs_totalBytesRecv);
uint64_t nTotalBytesSent; uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent);
// outbound limit & stats // outbound limit & stats
uint64_t nMaxOutboundTotalBytesSentInCycle; uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(cs_totalBytesSent);
uint64_t nMaxOutboundCycleStartTime; uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent);
uint64_t nMaxOutboundLimit; uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent);
uint64_t nMaxOutboundTimeframe; uint64_t nMaxOutboundTimeframe GUARDED_BY(cs_totalBytesSent);
// Whitelisted ranges. Any node connecting from these is automatically // Whitelisted ranges. Any node connecting from these is automatically
// whitelisted (as well as those connecting to whitelisted binds). // whitelisted (as well as those connecting to whitelisted binds).
@ -395,7 +395,7 @@ private:
CAddrMan addrman; CAddrMan addrman;
std::deque<std::string> vOneShots; std::deque<std::string> vOneShots;
CCriticalSection cs_vOneShots; CCriticalSection cs_vOneShots;
std::vector<std::string> vAddedNodes; std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes);
CCriticalSection cs_vAddedNodes; CCriticalSection cs_vAddedNodes;
std::vector<CNode*> vNodes; std::vector<CNode*> vNodes;
std::list<CNode*> vNodesDisconnected; std::list<CNode*> vNodesDisconnected;

Loading…
Cancel
Save