aboutsummaryrefslogtreecommitdiff
path: root/src/sync.h
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-09-25 10:55:52 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-09-25 10:56:00 -0400
commit0d86f4d3dacab38f3cd5371d0c920585c178302c (patch)
treee0adcd40ed647c8d803e51642760be4537af865b /src/sync.h
parent6e431296daceee604f48e9e3e87fa84cfd44bef2 (diff)
refactor: consolidate PASTE macros
Diffstat (limited to 'src/sync.h')
-rw-r--r--src/sync.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sync.h b/src/sync.h
index bdbdde1a2a..8ff6173142 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -7,6 +7,7 @@
#define BITCOIN_SYNC_H
#include <threadsafety.h>
+#include <util/macros.h>
#include <condition_variable>
#include <thread>
@@ -176,9 +177,6 @@ public:
template<typename MutexArg>
using DebugLock = UniqueLock<typename std::remove_reference<typename std::remove_pointer<MutexArg>::type>::type>;
-#define PASTE(x, y) x ## y
-#define PASTE2(x, y) PASTE(x, y)
-
#define LOCK(cs) DebugLock<decltype(cs)> PASTE2(criticalblock, __COUNTER__)(cs, #cs, __FILE__, __LINE__)
#define LOCK2(cs1, cs2) \
DebugLock<decltype(cs1)> criticalblock1(cs1, #cs1, __FILE__, __LINE__); \