#include <threadsafety.h>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
Go to the source code of this file.
|
#define | AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs) |
|
#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) |
|
#define | ENTER_CRITICAL_SECTION(cs) |
|
#define | LEAVE_CRITICAL_SECTION(cs) |
|
#define AssertLockHeld |
( |
|
cs | ) |
AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs) |
#define ENTER_CRITICAL_SECTION |
( |
|
cs | ) |
|
Value:{ \
EnterCritical(#cs, __FILE__, __LINE__, (void*)(&cs)); \
(cs).lock(); \
}
Definition at line 179 of file sync.h.
#define LEAVE_CRITICAL_SECTION |
( |
|
cs | ) |
|
Value:{ \
(cs).unlock(); \
LeaveCritical(); \
}
Definition at line 185 of file sync.h.
#define LOCK2 |
( |
|
cs1, |
|
|
|
cs2 |
|
) |
| CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__), criticalblock2(cs2, #cs2, __FILE__, __LINE__) |
#define PASTE |
( |
|
x, |
|
|
|
y |
|
) |
| x ## y |
#define PASTE2 |
( |
|
x, |
|
|
|
y |
|
) |
| PASTE(x, y) |
Just a typedef for boost::condition_variable, can be wrapped later if desired.
Definition at line 103 of file sync.h.
Wrapped boost mutex: supports waiting but not recursive locking.
Definition at line 100 of file sync.h.