fix(rtthread):too few arguments to function 'rt_sem_create' (#4770)

This commit is contained in:
lhdjply 2023-11-09 18:40:25 +08:00 committed by GitHub
parent 8cf0bbb558
commit 62c3f1c0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;