Merge bitcoin/bitcoin#26292: util: move threadinterrupt into util/

b89530483d util: move threadinterrupt into util (fanquake)

Pull request description:

  Alongside thread and threadnames. It's part of libbitcoin_util.

ACKs for top commit:
  ryanofsky:
    Code review ACK b89530483d. No changes since last review other than rebase
  theuni:
    ACK b89530483d.

Tree-SHA512: 0421f4d1881ec295272446804b27d16bf63e6b62b272f8bb52bfecde9ae6605e8109ed16294690d3e3ce4b15cc5e7c4046f99442df73adb10bdf069d3fb165aa
This commit is contained in:
fanquake 2022-11-22 09:52:29 +00:00
commit 1b680948d4
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1
15 changed files with 18 additions and 16 deletions

View file

@ -56,7 +56,6 @@ if [ "${RUN_TIDY}" = "true" ]; then
" src/rpc/fees.cpp"\
" src/rpc/signmessage.cpp"\
" src/test/fuzz/txorphan.cpp"\
" src/threadinterrupt.cpp"\
" src/util/bip32.cpp"\
" src/util/bytevectorhash.cpp"\
" src/util/check.cpp"\
@ -70,6 +69,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
" src/util/strencodings.cpp"\
" src/util/string.cpp"\
" src/util/syserror.cpp"\
" src/util/threadinterrupt.cpp"\
" src/zmq"\
" -p . ${MAKEJOBS} -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"
fi

View file

@ -258,7 +258,6 @@ BITCOIN_CORE_H = \
support/events.h \
support/lockedpool.h \
sync.h \
threadinterrupt.h \
threadsafety.h \
timedata.h \
torcontrol.h \
@ -298,6 +297,7 @@ BITCOIN_CORE_H = \
util/syserror.h \
util/system.h \
util/thread.h \
util/threadinterrupt.h \
util/threadnames.h \
util/time.h \
util/tokenpipe.h \
@ -687,7 +687,6 @@ libbitcoin_util_a_SOURCES = \
rpc/request.cpp \
support/cleanse.cpp \
sync.cpp \
threadinterrupt.cpp \
util/asmap.cpp \
util/bip32.cpp \
util/bytevectorhash.cpp \
@ -705,6 +704,7 @@ libbitcoin_util_a_SOURCES = \
util/readwritefile.cpp \
util/settings.cpp \
util/thread.cpp \
util/threadinterrupt.cpp \
util/threadnames.cpp \
util/serfloat.cpp \
util/spanparsing.cpp \

View file

@ -18,6 +18,7 @@
#include <util/spanparsing.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <util/threadinterrupt.h>
#include <chrono>
#include <memory>

View file

@ -9,8 +9,8 @@
#include <fs.h>
#include <netaddress.h>
#include <sync.h>
#include <threadinterrupt.h>
#include <util/sock.h>
#include <util/threadinterrupt.h>
#include <memory>
#include <optional>

View file

@ -7,7 +7,7 @@
#include <dbwrapper.h>
#include <interfaces/chain.h>
#include <threadinterrupt.h>
#include <util/threadinterrupt.h>
#include <validationinterface.h>
#include <string>

View file

@ -13,10 +13,10 @@
#include <net.h>
#include <netaddress.h>
#include <netbase.h>
#include <threadinterrupt.h>
#include <util/syscall_sandbox.h>
#include <util/system.h>
#include <util/thread.h>
#include <util/threadinterrupt.h>
#ifdef USE_NATPMP
#include <compat/compat.h>

View file

@ -31,6 +31,7 @@
#include <util/syscall_sandbox.h>
#include <util/system.h>
#include <util/thread.h>
#include <util/threadinterrupt.h>
#include <util/trace.h>
#include <util/translation.h>

View file

@ -24,10 +24,10 @@
#include <span.h>
#include <streams.h>
#include <sync.h>
#include <threadinterrupt.h>
#include <uint256.h>
#include <util/check.h>
#include <util/sock.h>
#include <util/threadinterrupt.h>
#include <atomic>
#include <condition_variable>

View file

@ -9,8 +9,8 @@
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <test/util/setup_common.h>
#include <threadinterrupt.h>
#include <util/system.h>
#include <util/threadinterrupt.h>
void initialize_i2p()
{

View file

@ -8,8 +8,8 @@
#include <test/util/logging.h>
#include <test/util/net.h>
#include <test/util/setup_common.h>
#include <threadinterrupt.h>
#include <util/system.h>
#include <util/threadinterrupt.h>
#include <boost/test/unit_test.hpp>

View file

@ -4,9 +4,9 @@
#include <compat/compat.h>
#include <test/util/setup_common.h>
#include <threadinterrupt.h>
#include <util/sock.h>
#include <util/system.h>
#include <util/threadinterrupt.h>
#include <boost/test/unit_test.hpp>

View file

@ -4,11 +4,11 @@
#include <compat/compat.h>
#include <logging.h>
#include <threadinterrupt.h>
#include <tinyformat.h>
#include <util/sock.h>
#include <util/syserror.h>
#include <util/system.h>
#include <util/threadinterrupt.h>
#include <util/time.h>
#include <memory>

View file

@ -6,7 +6,7 @@
#define BITCOIN_UTIL_SOCK_H
#include <compat/compat.h>
#include <threadinterrupt.h>
#include <util/threadinterrupt.h>
#include <util/time.h>
#include <chrono>

View file

@ -3,7 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <threadinterrupt.h>
#include <util/threadinterrupt.h>
#include <sync.h>

View file

@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_THREADINTERRUPT_H
#define BITCOIN_THREADINTERRUPT_H
#ifndef BITCOIN_UTIL_THREADINTERRUPT_H
#define BITCOIN_UTIL_THREADINTERRUPT_H
#include <sync.h>
#include <threadsafety.h>
@ -33,4 +33,4 @@ private:
std::atomic<bool> flag;
};
#endif // BITCOIN_THREADINTERRUPT_H
#endif // BITCOIN_UTIL_THREADINTERRUPT_H