#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/condition_variable.hpp>
#include "threadsafety.h"
Go to the source code of this file.
|
#define | LOCK(cs) CCriticalBlock criticalblock(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 ENTER_CRITICAL_SECTION |
( |
|
cs | ) |
|
Value:{ \
EnterCritical(#cs, __FILE__, __LINE__, (void*)(&cs)); \
(cs).lock(); \
}
Definition at line 112 of file sync.h.
#define LEAVE_CRITICAL_SECTION |
( |
|
cs | ) |
|
Value:{ \
(cs).unlock(); \
LeaveCritical(); \
}
Definition at line 118 of file sync.h.
#define LOCK |
( |
|
cs | ) |
CCriticalBlock criticalblock(cs, #cs, __FILE__, __LINE__) |
#define LOCK2 |
( |
|
cs1, |
|
|
|
cs2 |
|
) |
| CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__),criticalblock2(cs2, #cs2, __FILE__, __LINE__) |
Wrapped boost mutex: supports recursive locking, but no waiting.
Definition at line 38 of file sync.h.
Wrapped boost mutex: supports waiting but not recursive locking.
Definition at line 41 of file sync.h.