diff options
Diffstat (limited to 'src/shutdown.cpp')
-rw-r--r-- | src/shutdown.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/shutdown.cpp b/src/shutdown.cpp new file mode 100644 index 0000000000..dec497d8ec --- /dev/null +++ b/src/shutdown.cpp @@ -0,0 +1,23 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2018 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include <shutdown.h> + +#include <atomic> + +static std::atomic<bool> fRequestShutdown(false); + +void StartShutdown() +{ + fRequestShutdown = true; +} +void AbortShutdown() +{ + fRequestShutdown = false; +} +bool ShutdownRequested() +{ + return fRequestShutdown; +} |