Added mutex timeout and mutex ownership

This commit is contained in:
dario
2024-05-01 13:56:38 +02:00
parent 4ce4653f71
commit 33a1f757a2
2 changed files with 19 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
#include <cmsis_os2.h>
namespace sta
{
/**
@@ -30,10 +31,17 @@ namespace sta
*/
RtosMutex(const char* name);
/**
* @brief Method for checking mutex ownership.
*
* @return Returns true if the currently running thread is the owner of the mutex.
*/
bool isCurrentThreadOwner() override;
/**
* @brief Acquire the mutex.
*/
void acquire() override;
void acquire(uint32_t timeout = osWaitForever) override;
/**
* @brief Release the mutex.