µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
Go to the documentation of this file.
5 #ifndef UEL_SYSTEM_QUEUES_H
6 #define UEL_SYSTEM_QUEUES_H
28 #define UEL_SYSQUEUES_EVENT_QUEUE_SIZE (1<<UEL_SYSQUEUES_EVENT_QUEUE_SIZE_LOG2N)
39 #define UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE (1<<UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE_LOG2N)
void * schedule_queue_buffer[UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE]
The schedule queue buffer.
Definition: system-queues.h:41
uintptr_t uel_sysqueues_count_scheduled_events(uel_sysqueues_t *queues)
Counts the number of elements in the schedule queue.
void uel_sysqueues_init(uel_sysqueues_t *queues)
Initialises a new uel_sysqueues_t.
Events are special messages passed around the core. They represent tasks to be run at some point by t...
Definition: event.h:58
#define UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE
Unrolls the UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE_LOG2N value to its power-of-two form.
Definition: system-queues.h:39
uel_event_t * uel_sysqueues_get_enqueued_event(uel_sysqueues_t *queues)
Pops an event from the event queue.
uel_cqueue_t schedule_queue
The application's schedule queue.
Definition: system-queues.h:47
void uel_sysqueues_enqueue_event(uel_sysqueues_t *queues, uel_event_t *event)
Pushes an event into the event queue.
uel_cqueue_t event_queue
The application's event queue.
Definition: system-queues.h:35
Defines circular queues, fast and efficient FIFO data structures.
Defines events and methods to configure events.
void * event_queue_buffer[UEL_SYSQUEUES_EVENT_QUEUE_SIZE]
The event queue buffer.
Definition: system-queues.h:30
uintptr_t uel_sysqueues_count_enqueued_events(uel_sysqueues_t *queues)
Counts the number of elements in the event queue.
Central repository of system configuration. This is meant to be edited by the programmer as needed.
#define UEL_SYSQUEUES_EVENT_QUEUE_SIZE
Unrolls the UEL_SYSQUEUES_EVENT_QUEUE_SIZE_LOG2N value to its power-of-two form.
Definition: system-queues.h:28
void uel_sysqueues_schedule_event(uel_sysqueues_t *queues, uel_event_t *event)
Pushes an event into the schedule queue.
uel_event_t * uel_sysqueues_get_scheduled_event(uel_sysqueues_t *queues)
Pops an event from the schedule queue.
A container for the system's internal queues.
Definition: system-queues.h:25