Lines Matching refs:events
112 static inline void add_event(sys_dlist_t *events, struct k_poll_event *event, in add_event() argument
117 pending = (struct k_poll_event *)sys_dlist_peek_tail(events); in add_event()
121 sys_dlist_append(events, &event->_node); in add_event()
125 SYS_DLIST_FOR_EACH_CONTAINER(events, pending, _node) { in add_event()
133 sys_dlist_append(events, &event->_node); in add_event()
217 static inline void clear_event_registrations(struct k_poll_event *events, in clear_event_registrations() argument
222 clear_event_registration(&events[num_events]); in clear_event_registrations()
234 static inline int register_events(struct k_poll_event *events, in register_events() argument
246 if (is_condition_met(&events[ii], &state)) { in register_events()
247 set_event_ready(&events[ii], state); in register_events()
250 register_event(&events[ii], poller); in register_events()
288 int z_impl_k_poll(struct k_poll_event *events, int num_events, in z_impl_k_poll() argument
299 __ASSERT(events != NULL, "NULL events\n"); in z_impl_k_poll()
302 SYS_PORT_TRACING_FUNC_ENTER(k_poll_api, poll, events); in z_impl_k_poll()
304 events_registered = register_events(events, num_events, poller, in z_impl_k_poll()
315 clear_event_registrations(events, events_registered, key); in z_impl_k_poll()
318 SYS_PORT_TRACING_FUNC_EXIT(k_poll_api, poll, events, 0); in z_impl_k_poll()
328 SYS_PORT_TRACING_FUNC_EXIT(k_poll_api, poll, events, -EAGAIN); in z_impl_k_poll()
347 clear_event_registrations(events, events_registered, key); in z_impl_k_poll()
350 SYS_PORT_TRACING_FUNC_EXIT(k_poll_api, poll, events, swap_rc); in z_impl_k_poll()
356 static inline int z_vrfy_k_poll(struct k_poll_event *events, in z_vrfy_k_poll() argument
385 if (K_SYSCALL_MEMORY_WRITE(events, bounds)) { in z_vrfy_k_poll()
389 (void)memcpy(events_copy, events, bounds); in z_vrfy_k_poll()
428 (void)memcpy((void *)events, events_copy, bounds); in z_vrfy_k_poll()
467 void z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state) in z_handle_obj_poll_events() argument
472 poll_event = (struct k_poll_event *)sys_dlist_get(events); in z_handle_obj_poll_events()
583 clear_event_registrations(twork->events, in triggered_work_handler()
638 clear_event_registrations(work->events, work->num_events, key); in triggered_work_cancel()
668 struct k_poll_event *events, in k_work_poll_submit_to_queue() argument
677 __ASSERT(events != NULL, "NULL events\n"); in k_work_poll_submit_to_queue()
714 work->events = events; in k_work_poll_submit_to_queue()
721 events_registered = register_events(events, num_events, in k_work_poll_submit_to_queue()
768 clear_event_registrations(events, events_registered, key); in k_work_poll_submit_to_queue()
780 struct k_poll_event *events, in k_work_poll_submit() argument
787 events, num_events, timeout); in k_work_poll_submit()