From 62c3f1c0b5307a18c63709c1bee82afe69069d90 Mon Sep 17 00:00:00 2001 From: lhdjply <1029652979@qq.com> Date: Thu, 9 Nov 2023 18:40:25 +0800 Subject: [PATCH] fix(rtthread):too few arguments to function 'rt_sem_create' (#4770) --- src/osal/lv_rtthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osal/lv_rtthread.c b/src/osal/lv_rtthread.c index 956cbd2a3..39f78d784 100644 --- a/src/osal/lv_rtthread.c +++ b/src/osal/lv_rtthread.c @@ -83,7 +83,7 @@ lv_result_t lv_mutex_init(lv_mutex_t * mutex) lv_result_t lv_mutex_lock(lv_mutex_t * mutex) { - rt_err_t ret = rt_mutex_take(mutex->mutex, RT_WAITING_NO); + rt_err_t ret = rt_mutex_take(mutex->mutex, RT_WAITING_FOREVER); if(ret) { LV_LOG_WARN("Error: %d", ret); return LV_RESULT_INVALID; @@ -131,7 +131,7 @@ lv_result_t lv_mutex_delete(lv_mutex_t * mutex) lv_result_t lv_thread_sync_init(lv_thread_sync_t * sync) { - sync->sem = rt_sem_create("sem", RT_IPC_FLAG_PRIO); + sync->sem = rt_sem_create("sem", 0, RT_IPC_FLAG_PRIO); if(sync->sem == RT_NULL) { LV_LOG_WARN("create semaphore failed"); return LV_RESULT_INVALID;