Merge #8123: Use std::atomic for fRequestShutdown and fReopenDebugLog

a886dbf Use std::atomic for fRequestShutdown and fReopenDebugLog (Pieter Wuille)
16cf85f Revert "Include signal.h for sig_atomic_t in WIN32" (Pieter Wuille)
This commit is contained in:
Pieter Wuille 2016-06-01 20:23:11 +02:00 committed by Alexander Block
parent 09eda9783a
commit bf069fb1bd
3 changed files with 4 additions and 5 deletions

View File

@ -158,7 +158,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
// shutdown thing.
//
volatile sig_atomic_t fRequestShutdown = false;
std::atomic<bool> fRequestShutdown(false);
void StartShutdown()
{

View File

@ -131,7 +131,7 @@ bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
bool fLogThreadNames = DEFAULT_LOGTHREADNAMES;
bool fLogIPs = DEFAULT_LOGIPS;
volatile sig_atomic_t fReopenDebugLog = false;
std::atomic<bool> fReopenDebugLog(false);
CTranslationInterface translationInterface;
/** Init OpenSSL library multithreading support */

View File

@ -20,6 +20,7 @@
#include "utiltime.h"
#include "amount.h"
#include <atomic>
#include <exception>
#include <map>
#include <stdint.h>
@ -30,8 +31,6 @@
#include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp>
#include <signal.h>
// Debugging macros
// Uncomment the following line to enable debugging messages
@ -73,7 +72,7 @@ extern bool fLogTimestamps;
extern bool fLogTimeMicros;
extern bool fLogThreadNames;
extern bool fLogIPs;
extern volatile sig_atomic_t fReopenDebugLog;
extern std::atomic<bool> fReopenDebugLog;
extern CTranslationInterface translationInterface;
extern const char * const BITCOIN_CONF_FILENAME;