From 53c846f4acee1f5a2fc8532799c279238f2df230 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 24 Sep 2024 07:27:30 +0200 Subject: [PATCH] fix(freertos): use xSemaphoreTakeRecursive (#6803) --- src/osal/lv_freertos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osal/lv_freertos.c b/src/osal/lv_freertos.c index 1c81a8e05..cb022e895 100644 --- a/src/osal/lv_freertos.c +++ b/src/osal/lv_freertos.c @@ -127,7 +127,7 @@ lv_result_t lv_mutex_lock(lv_mutex_t * pxMutex) /* If mutex in uninitialized, perform initialization. */ prvCheckMutexInit(pxMutex); - BaseType_t xMutexTakeStatus = xSemaphoreTake(pxMutex->xMutex, portMAX_DELAY); + BaseType_t xMutexTakeStatus = xSemaphoreTakeRecursive(pxMutex->xMutex, portMAX_DELAY); if(xMutexTakeStatus != pdTRUE) { LV_LOG_ERROR("xSemaphoreTake failed!"); return LV_RESULT_INVALID; @@ -163,7 +163,7 @@ lv_result_t lv_mutex_unlock(lv_mutex_t * pxMutex) /* If mutex in uninitialized, perform initialization. */ prvCheckMutexInit(pxMutex); - BaseType_t xMutexGiveStatus = xSemaphoreGive(pxMutex->xMutex); + BaseType_t xMutexGiveStatus = xSemaphoreGiveRecursive(pxMutex->xMutex); if(xMutexGiveStatus != pdTRUE) { LV_LOG_ERROR("xSemaphoreGive failed!"); return LV_RESULT_INVALID;