Merge pull request #4852 from mysterywolf/rmovefifo

[kernel][ipc] 移除mutex RT_IPC_FLAG_FIFO 功能
This commit is contained in:
Bernard Xiong 2021-07-07 20:21:38 +08:00 committed by GitHub
commit 7c00795c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -548,6 +548,8 @@ RTM_EXPORT(rt_sem_control);
*/
rt_err_t rt_mutex_init(rt_mutex_t mutex, const char *name, rt_uint8_t flag)
{
(void)flag;
/* parameter check */
RT_ASSERT(mutex != RT_NULL);
@ -562,8 +564,8 @@ rt_err_t rt_mutex_init(rt_mutex_t mutex, const char *name, rt_uint8_t flag)
mutex->original_priority = 0xFF;
mutex->hold = 0;
/* set flag */
mutex->parent.parent.flag = flag;
/* flag can only be RT_IPC_FLAG_PRIO. RT_IPC_FLAG_FIFO cannot solve the unbounded priority inversion problem */
mutex->parent.parent.flag = RT_IPC_FLAG_PRIO;
return RT_EOK;
}
@ -609,6 +611,7 @@ RTM_EXPORT(rt_mutex_detach);
rt_mutex_t rt_mutex_create(const char *name, rt_uint8_t flag)
{
struct rt_mutex *mutex;
(void)flag;
RT_DEBUG_NOT_IN_INTERRUPT;
@ -625,8 +628,8 @@ rt_mutex_t rt_mutex_create(const char *name, rt_uint8_t flag)
mutex->original_priority = 0xFF;
mutex->hold = 0;
/* set flag */
mutex->parent.parent.flag = flag;
/* flag can only be RT_IPC_FLAG_PRIO. RT_IPC_FLAG_FIFO cannot solve the unbounded priority inversion problem */
mutex->parent.parent.flag = RT_IPC_FLAG_PRIO;
return mutex;
}