mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
lv_task: rename task_handler_mutex to already_running. Fixes #1238
This commit is contained in:
parent
7f19fb53e6
commit
8fe92bcd9a
@ -68,16 +68,16 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
|
||||
LV_LOG_TRACE("lv_task_handler started");
|
||||
|
||||
/*Avoid concurrent running of the task handler*/
|
||||
static bool task_handler_mutex = false;
|
||||
if(task_handler_mutex) return;
|
||||
task_handler_mutex = true;
|
||||
static bool already_running = false;
|
||||
if(already_running) return;
|
||||
already_running = true;
|
||||
|
||||
static uint32_t idle_period_start = 0;
|
||||
static uint32_t handler_start = 0;
|
||||
static uint32_t busy_time = 0;
|
||||
|
||||
if(lv_task_run == false) {
|
||||
task_handler_mutex = false; /*Release mutex*/
|
||||
already_running = false; /*Release mutex*/
|
||||
return;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
|
||||
idle_period_start = lv_tick_get();
|
||||
}
|
||||
|
||||
task_handler_mutex = false; /*Release the mutex*/
|
||||
already_running = false; /*Release the mutex*/
|
||||
|
||||
LV_LOG_TRACE("lv_task_handler ready");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user