|
| void | pbl_workq_init (struct pbl_workq *q) |
| | Initialize a work queue in dynamically allocated memory.
|
| |
| void | pbl_workq_set_ops (struct pbl_workq *q, const struct pbl_workq_ops *ops) |
| | Set the hooks of a queue, which take effect once it is next idle.
|
| |
| void | pbl_workq_thread (void *arg) |
| | Thread entry serving a queue, with the queue as its argument.
|
| |
| void | pbl_workq_flush (struct pbl_workq *q) |
| | Wait until everything submitted so far has run.
|
| |
| struct pbl_thread * | pbl_workq_get_thread (const struct pbl_workq *q) |
| | Get the thread serving a queue.
|
| |
| bool | pbl_workq_is_current (const struct pbl_workq *q) |
| | Check whether the caller runs on a queue's thread.
|
| |
| void * | pbl_workq_current_fn (const struct pbl_workq *q) |
| | Get the function being run, for debugging.
|
| |
| void | pbl_work_init (struct pbl_work *work, pbl_work_fn_t fn) |
| | Initialize a work item.
|
| |
| bool | pbl_work_submit (struct pbl_workq *q, struct pbl_work *work) |
| | Queue a work item.
|
| |
| void | pbl_workq_set_boost_prio (struct pbl_workq *q, pbl_prio_t prio) |
| | Set the priority a queue's thread runs at while it has boosted work.
|
| |
| bool | pbl_work_submit_boosted (struct pbl_workq *q, struct pbl_work *work) |
| | Queue a work item that raises its queue's priority until it has run.
|
| |
| bool | pbl_work_cancel (struct pbl_work *work) |
| | Remove a work item from its queue, without waiting for it if it is running.
|
| |
| bool | pbl_work_cancel_sync (struct pbl_work *work) |
| | Remove a work item from its queue and wait for it to finish running.
|
| |
| bool | pbl_work_flush (struct pbl_work *work) |
| | Wait for a work item to finish its last submission.
|
| |
| bool | pbl_work_is_pending (const struct pbl_work *work) |
| | Check whether a work item is queued.
|
| |
| bool | pbl_work_is_running (const struct pbl_work *work) |
| | Check whether a work item's function is running.
|
| |
| void | pbl_delayed_work_init (struct pbl_delayed_work *dwork, pbl_work_fn_t fn) |
| | Initialize a delayed work item.
|
| |
| bool | pbl_delayed_work_schedule (struct pbl_workq *q, struct pbl_delayed_work *dwork, pbl_timeout_t delay) |
| | Queue a delayed work item after a delay, unless it is already pending.
|
| |
| bool | pbl_delayed_work_reschedule (struct pbl_workq *q, struct pbl_delayed_work *dwork, pbl_timeout_t delay) |
| | Queue a delayed work item after a delay, replacing any pending delay.
|
| |
| void | pbl_delayed_work_schedule_next (struct pbl_delayed_work *dwork, pbl_tick_t period) |
| | Queue a delayed work item one period after its last expiry, so it does not drift.
|
| |
| bool | pbl_delayed_work_cancel (struct pbl_delayed_work *dwork) |
| | Stop a delayed work item, without waiting for it if it is running.
|
| |
| bool | pbl_delayed_work_cancel_sync (struct pbl_delayed_work *dwork) |
| | Stop a delayed work item and wait for it to finish running.
|
| |
| bool | pbl_delayed_work_is_pending (const struct pbl_delayed_work *dwork) |
| | Check whether a delayed work item is pending.
|
| |
| pbl_tick_t | pbl_delayed_work_remaining (const struct pbl_delayed_work *dwork) |
| | Get the time left on a delayed work item.
|
| |
| void | pbl_work_pool_init (struct pbl_work_pool *pool, struct pbl_work_call *slots, size_t num_slots) |
| | Initialize a pool in dynamically allocated memory.
|
| |
| size_t | pbl_work_pool_num_free (const struct pbl_work_pool *pool) |
| | Get the free slots of a pool.
|
| |
| int | pbl_work_call (struct pbl_workq *q, struct pbl_work_pool *pool, pbl_work_call_fn_t fn, void *data, pbl_timeout_t timeout) |
| | Run a function with a payload on a queue.
|
| |
| void | pbl_wallclock_work_init (struct pbl_wallclock_work *w, pbl_work_fn_t fn) |
| | Initialize a wall clock work item.
|
| |
| void | pbl_wallclock_work_start (struct pbl_workq *q, struct pbl_wallclock_work *w, uint32_t unit_s, uint32_t every) |
| | Queue a work item at every every -th boundary of the wall clock's unit_s seconds.
|
| |
| bool | pbl_wallclock_work_stop (struct pbl_wallclock_work *w) |
| | Stop a wall clock work item, and remove it from its queue if it is pending.
|
| |
| bool | pbl_wallclock_work_is_running (const struct pbl_wallclock_work *w) |
| | Check whether a wall clock work item is started.
|
| |
| bool | pbl_sys_work_call (pbl_work_call_fn_t fn, void *data) |
| | Run a function with a payload on pbl_sys_workq.
|
| |
| bool | pbl_sys_work_call_from_isr (pbl_work_call_fn_t fn, void *data) |
| | Like pbl_sys_work_call(), from an ISR: stops the system at once if no slot is free.
|
| |
| bool | pbl_sys_work_try_call (pbl_work_call_fn_t fn, void *data) |
| | Like pbl_sys_work_call(), but never waits nor stops the system.
|
| |
| bool | pbl_sys_work_call_high (pbl_work_call_fn_t fn, void *data) |
| | Run a short, time sensitive function with a payload on pbl_sys_workq_high.
|
| |
| void | pbl_sys_work_call_high_from_isr (pbl_work_call_fn_t fn, void *data) |
| | Like pbl_sys_work_call_high(), from an ISR: the call is dropped if no slot is free.
|
| |
| void | pbl_sys_work_block (bool block) |
| | Refuse new calls to pbl_sys_workq, e.g.
|
| |
| size_t | pbl_sys_work_num_free (void) |
| | Get how many calls the caller can make to pbl_sys_workq without waiting.
|
| |
| void * | pbl_sys_work_current_fn (void) |
| | Get the function running on pbl_sys_workq, for debugging.
|
| |