Lines Matching refs:poller
51 event->poller = NULL; in k_poll_event_init()
109 return p ? CONTAINER_OF(p, struct k_thread, poller) : NULL; in poller_thread()
113 struct z_poller *poller) in add_event() argument
119 (z_sched_prio_cmp(poller_thread(pending->poller), in add_event()
120 poller_thread(poller)) > 0)) { in add_event()
126 if (z_sched_prio_cmp(poller_thread(poller), in add_event()
127 poller_thread(pending->poller)) > 0) { in add_event()
138 struct z_poller *poller) in register_event() argument
143 add_event(&event->sem->poll_events, event, poller); in register_event()
147 add_event(&event->queue->poll_events, event, poller); in register_event()
151 add_event(&event->signal->poll_events, event, poller); in register_event()
155 add_event(&event->msgq->poll_events, event, poller); in register_event()
160 add_event(&event->pipe->poll_events, event, poller); in register_event()
171 event->poller = poller; in register_event()
179 event->poller = NULL; in clear_event_registration()
230 event->poller = NULL; in set_event_ready()
236 struct z_poller *poller, in register_events() argument
248 poller->is_polling = false; in register_events()
249 } else if (!just_check && poller->is_polling) { in register_events()
250 register_event(&events[ii], poller); in register_events()
267 struct k_thread *thread = poller_thread(event->poller); in signal_poller()
293 struct z_poller *poller = &arch_current_thread()->poller; in z_impl_k_poll() local
295 poller->is_polling = true; in z_impl_k_poll()
296 poller->mode = MODE_POLL; in z_impl_k_poll()
304 events_registered = register_events(events, num_events, poller, in z_impl_k_poll()
314 if (!poller->is_polling) { in z_impl_k_poll()
323 poller->is_polling = false; in z_impl_k_poll()
443 struct z_poller *poller = event->poller; in signal_poll_event() local
446 if (poller != NULL) { in signal_poll_event()
447 if (poller->mode == MODE_POLL) { in signal_poll_event()
449 } else if (poller->mode == MODE_TRIGGERED) { in signal_poll_event()
456 poller->is_polling = false; in signal_poll_event()
579 if (twork->poller.mode != MODE_NONE) { in triggered_work_handler()
598 twork->poller.is_polling = false; in triggered_work_expiration_handler()
608 struct z_poller *poller = event->poller; in signal_triggered_work() local
610 CONTAINER_OF(poller, struct k_work_poll, poller); in signal_triggered_work()
612 if (poller->is_polling && twork->workq != NULL) { in signal_triggered_work()
627 if (work->poller.is_polling && work->poller.mode != MODE_NONE) { in triggered_work_cancel()
635 work->poller.mode = MODE_NONE; in triggered_work_cancel()
708 work->poller.is_polling = true; in k_work_poll_submit_to_queue()
710 work->poller.mode = MODE_NONE; in k_work_poll_submit_to_queue()
722 &work->poller, false); in k_work_poll_submit_to_queue()
725 if (work->poller.is_polling && !K_TIMEOUT_EQ(timeout, K_NO_WAIT)) { in k_work_poll_submit_to_queue()
741 work->poller.mode = MODE_TRIGGERED; in k_work_poll_submit_to_queue()
760 if (work->poller.is_polling) { in k_work_poll_submit_to_queue()
761 work->poller.is_polling = false; in k_work_poll_submit_to_queue()