Split off RecursiveMutex from Mutex (#437)
* Split off RecursiveMutex from Mutex * Fix * Code quality
This commit is contained in:
committed by
GitHub
parent
f48654d3dc
commit
3fc2ff8bc6
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <Tactility/Log.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/Mutex.h>
|
||||
#include <Tactility/RecursiveMutex.h>
|
||||
#include <Tactility/Thread.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
@@ -10,8 +10,8 @@
|
||||
#define TAG "lvgl_task"
|
||||
|
||||
// Mutex for LVGL drawing
|
||||
static tt::Mutex lvgl_mutex(tt::Mutex::Type::Recursive);
|
||||
static tt::Mutex task_mutex(tt::Mutex::Type::Recursive);
|
||||
static tt::RecursiveMutex lvgl_mutex;
|
||||
static tt::RecursiveMutex task_mutex;
|
||||
|
||||
static uint32_t task_max_sleep_ms = 10;
|
||||
// Mutex for LVGL task state (to modify task_running state)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Tactility/hal/sdcard/SdCardDevice.h"
|
||||
#include <Tactility/Mutex.h>
|
||||
#include <Tactility/RecursiveMutex.h>
|
||||
#include <memory>
|
||||
|
||||
using tt::hal::sdcard::SdCardDevice;
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
|
||||
SimulatorSdCard() : SdCardDevice(MountBehaviour::AtBoot),
|
||||
state(State::Unmounted),
|
||||
lock(std::make_shared<tt::Mutex>(tt::Mutex::Type::Recursive))
|
||||
lock(std::make_shared<tt::RecursiveMutex>())
|
||||
{}
|
||||
|
||||
std::string getName() const override { return "Mock SD Card"; }
|
||||
|
||||
Reference in New Issue
Block a user