mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Do not shadow LOCK's criticalblock variable for LOCK inside LOCK
This commit is contained in:
parent
6e6ab2c323
commit
33d15a3a76
@ -171,7 +171,10 @@ public:
|
||||
|
||||
typedef CMutexLock<CCriticalSection> CCriticalBlock;
|
||||
|
||||
#define LOCK(cs) CCriticalBlock criticalblock(cs, #cs, __FILE__, __LINE__)
|
||||
#define PASTE(x, y) x ## y
|
||||
#define PASTE2(x, y) PASTE(x, y)
|
||||
|
||||
#define LOCK(cs) CCriticalBlock PASTE2(criticalblock, __COUNTER__)(cs, #cs, __FILE__, __LINE__)
|
||||
#define LOCK2(cs1, cs2) CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__), criticalblock2(cs2, #cs2, __FILE__, __LINE__)
|
||||
#define TRY_LOCK(cs, name) CCriticalBlock name(cs, #cs, __FILE__, __LINE__, true)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user