From 88bc5f94852a0b2839a3ef4e1a6a5168d02f6b55 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 11 Feb 2012 20:02:55 +0100 Subject: Macros for manual critical sections --- src/util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 8dcedb147b..ddc8791b38 100644 --- a/src/util.h +++ b/src/util.h @@ -218,6 +218,12 @@ public: #define CRITICAL_BLOCK(cs) \ if (CCriticalBlock criticalblock = CCriticalBlock(cs, #cs, __FILE__, __LINE__)) +#define ENTER_CRITICAL_SECTION(cs) \ + (cs).Enter(#cs, __FILE__, __LINE__) + +#define LEAVE_CRITICAL_SECTION(cs) \ + (cs).Leave() + class CTryCriticalBlock { protected: -- cgit v1.2.3