11 template<
typename T_Mutex,
char const* T_LockName = DtScopedLockDefaultName>
18 if (!
lock.try_acquire(m))
31 typename T_Mutex::scoped_lock
lock;
39 template<
typename T_Mutex,
char const* T_LockName = DtScopedRwLockDefaultName>
49 void acquire(T_Mutex& m,
bool writeLock =
true)
51 if (!
lock.try_acquire(m, writeLock))
54 lock.acquire(m, writeLock);
61 return lock.upgrade_to_writer();
71 return lock.downgrade_to_reader();
75 typename T_Mutex::scoped_lock
lock;
const char DtScopedLockDefaultName[]
Definition: tracyLocks.h:7
DtTracyScopedLock(T_Mutex &m)
Definition: tracyLocks.h:15
DtTracyScopedRwLock(T_Mutex &m, bool writeLock)
Definition: tracyLocks.h:43
Template around a TBB RW Mutex lock which adds a tracy marker when the lock is waiting on the mutex...
Definition: tracyLocks.h:40
void release()
Definition: tracyLocks.h:25
void acquire(T_Mutex &m, bool writeLock=true)
Definition: tracyLocks.h:49
Template around a TBB Mutex lock which adds a tracy marker when the lock is waiting on the mutex...
Definition: tracyLocks.h:12
bool downgrade_to_reader()
Definition: tracyLocks.h:69
T_Mutex::scoped_lock lock
Definition: tracyLocks.h:75
const char DtScopedRwLockDefaultName[]
Definition: tracyLocks.h:35
void release()
Definition: tracyLocks.h:64
Definition: vrfProfileColors.h:23
T_Mutex::scoped_lock lock
Definition: tracyLocks.h:31
bool upgrade_to_writer()
Definition: tracyLocks.h:58
#define DtPROFILEC(name, color)
Definition: profiler.h:78