ProfiledMutex#
Fully qualified name: carb::profiler::ProfiledMutex
Defined in carb/profiler/Profile.h
-
template<class Mutex>
class ProfiledMutex# Wrapper to add automatic profiling to a mutex.
Subclassed by carb::profiler::ProfiledSharedMutex< Mutex >
Public Functions
-
inline ProfiledMutex(const uint64_t profileMask, const char *name)#
Constructor.
- Parameters:
profileMask – The mask used to determine if events from this mutex are captured.
name – The name of the mutex
- inline ProfiledMutex( )#
Constructor.
- Parameters:
channel – The profiling channel used to determine if events from this mutex are captured.
name – The name of the mutex
-
inline ~ProfiledMutex()#
Destructor.
-
inline void lock()#
Locks the underlying mutex and reports the event to the profiler.
-
inline bool try_lock()#
Attempts a lock on the underlying mutex and reports the event to the profiler if successful.
- Returns:
true
if successfully locked;false
otherwise.
-
inline void unlock()#
Unlocks the underlying mutex and reports the event to the profiler.
Protected Functions
- inline ProfiledMutex(
- const uint64_t profileMask,
- bool isSharedMutex,
- const char *name,
Protected Constructor.
- Parameters:
profileMask – The mask used to determine if events from this mutex are captured.
isSharedMutex – A boolean representing whether
*this
represents a shared mutex.name – The name of the mutex
- inline ProfiledMutex( )#
Protected Constructor.
- Parameters:
channel – The channel used to determine if events from this mutex are captured.
isSharedMutex – A boolean representing whether
*this
represents a shared mutex.name – The name of the mutex
Protected Attributes
-
LockableId m_lockableId#
The lockable ID as returned by carb::profiler::IProfiler::createLockable()
-
inline ProfiledMutex(const uint64_t profileMask, const char *name)#