mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Fix mutex scope and storage duration
This commit is contained in:
@@ -31,7 +31,11 @@ void FatalError::resetReporter (Reporter& reporter)
|
||||
|
||||
FatalError::FatalError (char const* message, char const* fileName, int lineNumber)
|
||||
{
|
||||
LockType::ScopedLockType lock (m_mutex);
|
||||
typedef CriticalSection LockType;
|
||||
|
||||
static LockType s_mutex;
|
||||
|
||||
LockType::ScopedLockType lock (s_mutex);
|
||||
|
||||
String const backtraceString = SystemStats::getStackBacktrace ();
|
||||
|
||||
|
||||
@@ -87,11 +87,7 @@ public:
|
||||
FatalError (char const* message, char const* fileName, int lineNumber);
|
||||
|
||||
private:
|
||||
typedef CriticalSection LockType;
|
||||
|
||||
static Static::Storage <Atomic <Reporter*>, FatalError> s_reporter;
|
||||
|
||||
LockType m_mutex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user