|
µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
Module responsible for keeping track of time and tasks to be run in the future. More...
#include "uevloop/system/containers/system-pools.h"#include "uevloop/system/containers/system-queues.h"#include "uevloop/utils/linked-list.h"#include "uevloop/utils/closure.h"

Go to the source code of this file.
Data Structures | |
| struct | uel_scheduer_t |
| The scheduler object. More... | |
Functions | |
| void | uel_sch_init (uel_scheduer_t *scheduler, uel_syspools_t *pools, uel_sysqueues_t *queues) |
| Initialises a scheduler object. More... | |
| uel_event_t * | uel_sch_run_later (uel_scheduer_t *scheduler, uint16_t timeout_in_ms, uel_closure_t closure, void *value) |
| Enqueues a closure for later execution. More... | |
| uel_event_t * | uel_sch_run_at_intervals (uel_scheduer_t *scheduler, uint16_t interval_in_ms, bool immediate, uel_closure_t closure, void *value) |
| Enqueues a closure for execution at intervals. More... | |
| void | uel_sch_manage_timers (uel_scheduer_t *scheduler) |
| Enqueue timers that are due to be processed in the event queue. More... | |
| void | uel_sch_update_timer (uel_scheduer_t *scheduler, uint32_t timer) |
| Updates the internal time counter. More... | |
Module responsible for keeping track of time and tasks to be run in the future.
| void uel_sch_init | ( | uel_scheduer_t * | scheduler, |
| uel_syspools_t * | pools, | ||
| uel_sysqueues_t * | queues | ||
| ) |
Initialises a scheduler object.
| scheduler | The uel_scheduer_t instance to be initialised |
| pools | The system's internal pools |
| queues | The system's internal queues |
| void uel_sch_manage_timers | ( | uel_scheduer_t * | scheduler | ) |
Enqueue timers that are due to be processed in the event queue.
Checks, based on the current time counter, what timers should be enqueued for execution. Afterwards, enqueue them.
| scheduler | The uel_scheduer_t to manage |
| uel_event_t* uel_sch_run_at_intervals | ( | uel_scheduer_t * | scheduler, |
| uint16_t | interval_in_ms, | ||
| bool | immediate, | ||
| uel_closure_t | closure, | ||
| void * | value | ||
| ) |
Enqueues a closure for execution at intervals.
| scheduler | The uel_scheduer_t into which the event will be registered |
| interval_in_ms | The delay in milliseconds two executions of the closure |
| immediate | If this flag is set, the the event will be created with a due time to the current time. |
| closure | The closure to be invoked when the due time is reached |
| value | The value to invoked the closure with |
| uel_event_t* uel_sch_run_later | ( | uel_scheduer_t * | scheduler, |
| uint16_t | timeout_in_ms, | ||
| uel_closure_t | closure, | ||
| void * | value | ||
| ) |
Enqueues a closure for later execution.
| scheduler | The uel_scheduer_t into which the event will be registered |
| timeout_in_ms | The delay in milliseconds until the closure is run |
| closure | The closure to be invoked when the due time is reached |
| value | The value to invoked the closure with |
| void uel_sch_update_timer | ( | uel_scheduer_t * | scheduler, |
| uint32_t | timer | ||
| ) |
Updates the internal time counter.
| scheduler | The scheduler whose time coounter should be updated |
| timer | The new counter value to be acknowledged. |
1.8.17