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