summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-01-14 12:24:12 -0500
committerBernard Xiong <[email protected]>2022-01-20 20:58:46 +0800
commit65ecca80ee7b3e63998d2207f28fdc8847169eb3 (patch)
treee159b3df4d39082c2b319a22f305659de786b968 /src/ipc.c
parent563e49890c597c53adba954063c37b03644c5c69 (diff)
[kernel] improve comments
Diffstat (limited to 'src/ipc.c')
-rwxr-xr-xsrc/ipc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 09cc74e103..aea149a67a 100755
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -725,8 +725,7 @@ RTM_EXPORT(rt_sem_control);
*
* @param flag is the mutex flag, which determines the queuing way of how multiple threads wait
* when the mutex is not available.
- * NOTE: The mutex flag can ONLY be RT_IPC_FLAG_PRIO. Using RT_IPC_FLAG_FIFO will seriously affect
- * the real-time performance of the system.
+ * NOTE: This parameter has been obsoleted. It can be RT_IPC_FLAG_PRIO, RT_IPC_FLAG_FIFO or RT_NULL.
*
* @return Return the operation status. When the return value is RT_EOK, the initialization is successful.
* If the return value is any other values, it represents the initialization failed.
@@ -735,7 +734,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;
+ /* flag parameter has been obsoleted */
+ RT_UNUSED(flag);
/* parameter check */
RT_ASSERT(mutex != RT_NULL);
@@ -807,8 +807,7 @@ RTM_EXPORT(rt_mutex_detach);
*
* @param flag is the mutex flag, which determines the queuing way of how multiple threads wait
* when the mutex is not available.
- * NOTE: The mutex flag can ONLY be RT_IPC_FLAG_PRIO. Using RT_IPC_FLAG_FIFO will seriously affect
- * the real-time performance of the system.
+ * NOTE: This parameter has been obsoleted. It can be RT_IPC_FLAG_PRIO, RT_IPC_FLAG_FIFO or RT_NULL.
*
* @return Return a pointer to the mutex object. When the return value is RT_NULL, it means the creation failed.
*
@@ -817,7 +816,9 @@ RTM_EXPORT(rt_mutex_detach);
rt_mutex_t rt_mutex_create(const char *name, rt_uint8_t flag)
{
struct rt_mutex *mutex;
- (void)flag;
+
+ /* flag parameter has been obsoleted */
+ RT_UNUSED(flag);
RT_DEBUG_NOT_IN_INTERRUPT;