riot_sys::bindgen

Function thread_flags_wait_any

Source
pub unsafe extern "C" fn thread_flags_wait_any(
    mask: thread_flags_t,
) -> thread_flags_t
Expand description

@brief Wait for any flag in mask to become set (blocking)

If any of the flags in mask are already set, this function will return immediately, otherwise, it will suspend the thread (as THREAD_STATUS_WAIT_ANY) until any of the flags in mask get set.

Both ways, it will clear and return (thread_get_active()->flags & mask).

@param[in] mask mask of flags to wait for

@returns flags that caused return/wakeup (thread_get_active()->flags & mask).