Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864634
D9311.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D9311.diff
View Options
diff --git a/src/warnings.cpp b/src/warnings.cpp
--- a/src/warnings.cpp
+++ b/src/warnings.cpp
@@ -10,28 +10,28 @@
#include <util/system.h>
#include <util/translation.h>
-static RecursiveMutex cs_warnings;
-static std::string strMiscWarning GUARDED_BY(cs_warnings);
-static bool fLargeWorkForkFound GUARDED_BY(cs_warnings) = false;
-static bool fLargeWorkInvalidChainFound GUARDED_BY(cs_warnings) = false;
+static Mutex g_warnings_mutex;
+static std::string strMiscWarning GUARDED_BY(g_warnings_mutex);
+static bool fLargeWorkForkFound GUARDED_BY(g_warnings_mutex) = false;
+static bool fLargeWorkInvalidChainFound GUARDED_BY(g_warnings_mutex) = false;
void SetMiscWarning(const std::string &strWarning) {
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
strMiscWarning = strWarning;
}
void SetfLargeWorkForkFound(bool flag) {
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
fLargeWorkForkFound = flag;
}
bool GetfLargeWorkForkFound() {
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
return fLargeWorkForkFound;
}
void SetfLargeWorkInvalidChainFound(bool flag) {
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
fLargeWorkInvalidChainFound = flag;
}
@@ -40,7 +40,7 @@
std::string warnings_verbose;
const std::string warning_separator = "<hr />";
- LOCK(cs_warnings);
+ LOCK(g_warnings_mutex);
// Pre-release build warning
if (!CLIENT_VERSION_IS_RELEASE) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 21:20 (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865942
Default Alt Text
D9311.diff (1 KB)
Attached To
D9311: refactor: Replace RecursiveMutex with Mutex in warnings.cpp
Event Timeline
Log In to Comment