zephyr::raw

Function k_event_wait

source
pub unsafe extern "C" fn k_event_wait(
    event: *mut k_event,
    events: u32,
    reset: bool,
    timeout: k_timeout_t,
) -> u32
Expand description

@brief Wait for any of the specified events

This routine waits on event object @a event until any of the specified events have been delivered to the event object, or the maximum wait time @a timeout has expired. A thread may wait on up to 32 distinctly numbered events that are expressed as bits in a single 32-bit word.

@note The caller must be careful when resetting if there are multiple threads waiting for the event object @a event.

@param event Address of the event object @param events Set of desired events on which to wait @param reset If true, clear the set of events tracked by the event object before waiting. If false, do not clear the events. @param timeout Waiting period for the desired set of events or one of the special values K_NO_WAIT and K_FOREVER.

@retval set of matching events upon success @retval 0 if matching events were not received within the specified time