mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Macros for manual critical sections
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user