37 Mutex(
const char* name,
const char* nameExtension = 0 )
noexcept;
70 bool Lock( uint32_t maxMsecToWait)
noexcept;
C-facing helper functions for delays, cycle counters, and creation of RTOS handles (queues,...
bool os_mutex_create_ex(OS_Mutex &mutex, const char *mutexName, OS_Uint priority=OS_INHERIT, bool suppressVerbose=true) noexcept
Creates a mutex with the specified parameters.
Definition OsUtility.cpp:151
bool Lock(uint32_t maxMsecToWait) noexcept
This function locks the mutex.
Definition Mutex.cpp:56
bool IsInitialized() const noexcept
Accessor function to support testing.
Definition Mutex.h:60
const char * GetName() const noexcept
Definition Mutex.h:86
static constexpr uint32_t MaxNameLength
Definition Mutex.h:101
bool EnsureInitialized() noexcept
Definition Mutex.h:91
Mutex(const Mutex ©)=delete
The Copy constructor is deleted to avoid copying instances.
OS_Mutex mutex
Definition Mutex.h:104
bool initialized
Definition Mutex.h:106
~Mutex()
The destructor deletes the mutex.
Definition Mutex.cpp:44
bool Unlock() noexcept
This function unlocks the mutex.
Definition Mutex.cpp:80
Mutex & operator=(const Mutex ©)=delete
The assignment operator constructor is deleted to avoid copying instances.
uint32_t GetOwnershipCount() const noexcept
Definition Mutex.h:79
char mutexName[MaxNameLength+1]
Definition Mutex.h:105
osMutexId_t OS_Mutex
Definition os_cmsis.h:28