Skip to content

Commit 6e33441

Browse files
committed
[ipc][mutex] 补充注释
1 parent edcdd12 commit 6e33441

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ rt_err_t rt_mutex_init(rt_mutex_t mutex, const char *name, rt_uint8_t flag)
564564
mutex->original_priority = 0xFF;
565565
mutex->hold = 0;
566566

567-
/* set flag and it can only be RT_IPC_FLAG_PRIO */
567+
/* flag can only be RT_IPC_FLAG_PRIO. RT_IPC_FLAG_FIFO cannot solve the unbounded priority inversion problem */
568568
mutex->parent.parent.flag = RT_IPC_FLAG_PRIO;
569569

570570
return RT_EOK;
@@ -628,7 +628,7 @@ rt_mutex_t rt_mutex_create(const char *name, rt_uint8_t flag)
628628
mutex->original_priority = 0xFF;
629629
mutex->hold = 0;
630630

631-
/* set flag and it can only be RT_IPC_FLAG_PRIO */
631+
/* flag can only be RT_IPC_FLAG_PRIO. RT_IPC_FLAG_FIFO cannot solve the unbounded priority inversion problem */
632632
mutex->parent.parent.flag = RT_IPC_FLAG_PRIO;
633633

634634
return mutex;

0 commit comments

Comments
 (0)