diff options
| author | Meco Man <[email protected]> | 2021-07-07 03:30:01 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-07-07 09:47:09 +0800 |
| commit | edcdd126edf86b9990e15449ab69c8554da9e274 (patch) | |
| tree | 85872e5128affc9cc5e80ee24fb9b8166ceea996 | |
| parent | b3fa063a8dc16cd0817fbb5de8729af75fa09b8d (diff) | |
[kernel][ipc] 移除mutex RT_IPC_FLAG_FIFO 功能
| -rwxr-xr-x | src/ipc.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; + /* set flag and it can only be RT_IPC_FLAG_PRIO */ + 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; + /* set flag and it can only be RT_IPC_FLAG_PRIO */ + mutex->parent.parent.flag = RT_IPC_FLAG_PRIO; return mutex; } |
