Merge #13116: Add Clang thread safety annotations for variables guarded by cs_{rpcWarmup,nTimeOffset,warnings}

8499f15e67 Add Clang thread safety annotations for variables guarded by cs_warnings (practicalswift)
cf13ad23d4 Add Clang thread safety annotations for variables guarded by cs_nTimeOffset (practicalswift)
012dec0347 Add Clang thread safety annotations for variables guarded by cs_rpcWarmup (practicalswift)

Pull request description:

  Add Clang thread safety annotations for variables guarded by `cs_{rpcWarmup,nTimeOffset,warnings}`.

Tree-SHA512: 8e0a4b9e36a4450bd75ad32c21d813bb572aaaa5b4a4cbdcbf4678e58ade6265c0b275352391168930a63fcbd09caa3b76e74595a7b14646054c52870c46d007
This commit is contained in:
MarcoFalke committed 2018-05-14 08:46:54 -04:00
commit ea7d6553bc
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -23,10 +23,10 @@
#include <memory> // for unique_ptr #include <memory> // for unique_ptr
#include <unordered_map> #include <unordered_map>
static bool fRPCRunning = false;
static bool fRPCInWarmup = true;
static std::string rpcWarmupStatus("RPC server started");
static CCriticalSection cs_rpcWarmup; static CCriticalSection cs_rpcWarmup;
static bool fRPCRunning = false;
static bool fRPCInWarmup GUARDED_BY(cs_rpcWarmup) = true;
static std::string rpcWarmupStatus GUARDED_BY(cs_rpcWarmup) = "RPC server started";
/* Timer-creating functions */ /* Timer-creating functions */
static RPCTimerInterface* timerInterface = nullptr; static RPCTimerInterface* timerInterface = nullptr;
/* Map of name to timer. */ /* Map of name to timer. */
+1 -1
View File
@@ -17,7 +17,7 @@
static CCriticalSection cs_nTimeOffset; static CCriticalSection cs_nTimeOffset;
static int64_t nTimeOffset = 0; static int64_t nTimeOffset GUARDED_BY(cs_nTimeOffset) = 0;
/** /**
* "Never go to sea with two chronometers; take one or three." * "Never go to sea with two chronometers; take one or three."
+3 -3
View File
@@ -9,9 +9,9 @@
#include <warnings.h> #include <warnings.h>
CCriticalSection cs_warnings; CCriticalSection cs_warnings;
std::string strMiscWarning; std::string strMiscWarning GUARDED_BY(cs_warnings);
bool fLargeWorkForkFound = false; bool fLargeWorkForkFound GUARDED_BY(cs_warnings) = false;
bool fLargeWorkInvalidChainFound = false; bool fLargeWorkInvalidChainFound GUARDED_BY(cs_warnings) = false;
void SetMiscWarning(const std::string& strWarning) void SetMiscWarning(const std::string& strWarning)
{ {