From 937734b1e9f5fc52e0ac727549bd2e4b4c864e3c Mon Sep 17 00:00:00 2001 From: Guangyao Ma Date: Tue, 11 May 2021 21:09:24 +0800 Subject: [PATCH] fix: modify event API description Change-Id: I131c70e52d907b6c52232596475f2dba16612fce --- kernel/base/ipc/los_event.c | 4 ++-- kernel/include/los_event.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/base/ipc/los_event.c b/kernel/base/ipc/los_event.c index 9fe6142d..028e35c9 100644 --- a/kernel/base/ipc/los_event.c +++ b/kernel/base/ipc/los_event.c @@ -296,7 +296,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventDestroy(PEVENT_CB_S eventCB) return LOS_OK; } -LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events) +LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 eventMask) { UINT32 intSave; @@ -304,7 +304,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events) return LOS_ERRNO_EVENT_PTR_NULL; } SCHEDULER_LOCK(intSave); - eventCB->uwEventID &= events; + eventCB->uwEventID &= eventMask; SCHEDULER_UNLOCK(intSave); return LOS_OK; diff --git a/kernel/include/los_event.h b/kernel/include/los_event.h index f9a9a455..8a426eaa 100644 --- a/kernel/include/los_event.h +++ b/kernel/include/los_event.h @@ -287,7 +287,7 @@ extern UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events); /** * @ingroup los_event - * @brief Clear the event occurring in a specified task. + * @brief Clear the event of the eventCB by a specified eventMask. * * @par Description: * * * @param eventCB [IN/OUT] Pointer to the event control block to be cleared. - * @param events [IN] Mask of the event to be cleared. + * @param eventMask [IN] Mask of the event to be cleared. * * @retval #LOS_ERRNO_EVENT_PTR_NULL Null pointer. * @retval #LOS_OK The event is successfully cleared. @@ -308,7 +308,7 @@ extern UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events); * * @see LOS_EventPoll | LOS_EventRead | LOS_EventWrite */ -extern UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events); +extern UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 eventMask); /** * @ingroup los_event