UINT32 LOS_EventRead ( PEVENT_CB_S  pstEventCB,
UINT32  uwEventMask,
UINT32  uwMode,
UINT32  uwTimeOut  
)

Read an event.

Description:
This API is used to block or schedule a task that reads an event of which the event control block, event mask, reading mode, and timeout information are specified.
注意:
  • An error code and an event return value can be same. To differentiate the error code and return value, bit 25 of the event mask is forbidden to be used.
参数:
参数名称 描述
pstEventCB  [IN/OUT] Pointer to the event control block to be checked. This parameter must point to valid memory.
uwEventMask  [IN] Mask of the event expected to occur by the user, indicating the event obtained after it is logically processed that matches the ID pointed to by uwEventID.
uwMode  [IN] Event reading mode.
uwTimeOut  [IN] Timeout interval of event reading (unit: Tick).
返回值:
返回值 描述
LOS_ERRNO_EVENT_SETBIT_INVALID  Bit 25 of the event mask cannot be set because it is set to an error number.
LOS_ERRNO_EVENT_EVENTMASK_INVALID  The passed-in event reading mode is incorrect.
LOS_ERRNO_EVENT_READ_IN_INTERRUPT  The event is being read during an interrupt.
LOS_ERRNO_EVENT_FLAGS_INVALID  The event mode is invalid.
LOS_ERRNO_EVENT_READ_IN_LOCK  The event reading task is locked.
LOS_ERRNO_EVENT_PTR_NULL  The passed-in pointer is null.
The event expected by the user does not occur.
UINT32  The event expected by the user occurs.
Dependency:
  • los_event.h: the header file that contains the API declaration.
参见:
LOS_EventPoll | LOS_EventWrite
自从:
Huawei LiteOS V100R001C00