Single process-wide run loop for dispatching events across cores or threads. More...


Go to the source code of this file.
Typedefs | |
| typedef void(* | sys_runloop_init_func_t) (uint8_t worker_index) |
| Per-worker initialisation callback. More... | |
| typedef void(* | sys_runloop_event_func_t) (sys_event_t event) |
| Event handler called on a worker for each posted event. More... | |
| typedef void(* | sys_runloop_poll_func_t) (void) |
| Optional periodic poll callback invoked by worker 0. More... | |
| typedef void(* | sys_runloop_exit_func_t) (uint8_t worker_index) |
| Per-worker exit callback. More... | |
Functions | |
Methods | |
| uint32_t | sys_runloop_run (uint8_t num_workers, sys_event_queue_t *queue, sys_runloop_init_func_t init_fn, sys_runloop_event_func_t event_fn, sys_runloop_poll_func_t poll_fn, sys_runloop_exit_func_t exit_fn) |
| Start the run loop and block until shutdown. More... | |
| void | sys_runloop_shutdown (uint32_t exit_value) |
| Signal the run loop to stop accepting events and exit when drained. More... | |
| bool | sys_runloop_post (sys_event_t event) |
| Post an event to be processed by the run loop. More... | |
Single process-wide run loop for dispatching events across cores or threads.
Definition in file runloop.h.