mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-10 07:09:46 +08:00
Added destructor to CMSIS_RTOS2 mutex
This commit is contained in:
parent
c92ab94220
commit
5402a3ed14
@ -44,12 +44,17 @@ namespace etl
|
||||
public:
|
||||
|
||||
mutex()
|
||||
: id(0)
|
||||
: id(NULL)
|
||||
{
|
||||
osMutexAttr_t attr = { "ETL", osMutexRecursive | osMutexPrioInherit | osMutexRobust, 0, 0 };
|
||||
id = osMutexNew(&attr);
|
||||
}
|
||||
|
||||
~mutex()
|
||||
{
|
||||
osMutexDelete(id);
|
||||
}
|
||||
|
||||
void lock()
|
||||
{
|
||||
osMutexAcquire(id, osWaitForever);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user