Browse Source

Merge #8472: Do not shadow LOCK's criticalblock variable for LOCK inside LOCK

33d15a3 Do not shadow LOCK's criticalblock variable for LOCK inside LOCK (Pavel Janík)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
0e563d89c0
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 5
      src/sync.h

5
src/sync.h

@ -171,7 +171,10 @@ public: @@ -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…
Cancel
Save