static int event\_walk\_op(struct k\_thread \*thread, void \*data)
{
unsigned int wait_condition;
struct event\_walk\_data \*event_data = data;
wait_condition = thread->event_options & K_EVENT_WAIT_MASK;
if (are\_wait\_conditions\_met(thread->events, event_data->events,
wait_condition)) {
/\*
\* Events create a list of threads to wake up. We do
\* not want z\_thread\_timeout to wake these threads; they
\* will be woken up by k\_event\_post\_internal once they
\* have been processed.
\*/
thread->no_wake_on_timeout = true;
/\*
\* The wait conditions have been satisfied. Add this
\* thread to the list of threads to unpend.
\*/
thread->next_event_link = event_data->head;
event_data->head = thread;
z\_abort\_timeout(&thread->base.timeout);
}
return 0;
}