µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
A container for the system's internal queues. More...
#include "uevloop/system/event.h"
#include "uevloop/config.h"
#include "uevloop/utils/circular-queue.h"
Go to the source code of this file.
Data Structures | |
struct | uel_sysqueues_t |
A container for the system's internal queues. More... | |
Macros | |
#define | UEL_SYSQUEUES_EVENT_QUEUE_SIZE (1<<UEL_SYSQUEUES_EVENT_QUEUE_SIZE_LOG2N) |
Unrolls the UEL_SYSQUEUES_EVENT_QUEUE_SIZE_LOG2N value to its power-of-two form. | |
#define | UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE (1<<UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE_LOG2N) |
Unrolls the UEL_SYSQUEUES_SCHEDULE_QUEUE_SIZE_LOG2N value to its power-of-two form. | |
Functions | |
void | uel_sysqueues_init (uel_sysqueues_t *queues) |
Initialises a new uel_sysqueues_t. More... | |
void | uel_sysqueues_enqueue_event (uel_sysqueues_t *queues, uel_event_t *event) |
Pushes an event into the event queue. More... | |
uel_event_t * | uel_sysqueues_get_enqueued_event (uel_sysqueues_t *queues) |
Pops an event from the event queue. More... | |
uintptr_t | uel_sysqueues_count_enqueued_events (uel_sysqueues_t *queues) |
Counts the number of elements in the event queue. More... | |
void | uel_sysqueues_schedule_event (uel_sysqueues_t *queues, uel_event_t *event) |
Pushes an event into the schedule queue. More... | |
uel_event_t * | uel_sysqueues_get_scheduled_event (uel_sysqueues_t *queues) |
Pops an event from the schedule queue. More... | |
uintptr_t | uel_sysqueues_count_scheduled_events (uel_sysqueues_t *queues) |
Counts the number of elements in the schedule queue. More... | |
A container for the system's internal queues.
uintptr_t uel_sysqueues_count_enqueued_events | ( | uel_sysqueues_t * | queues | ) |
Counts the number of elements in the event queue.
queues | The uel_sysqueues_t instance whose event queue's elements should be counted |
uintptr_t uel_sysqueues_count_scheduled_events | ( | uel_sysqueues_t * | queues | ) |
Counts the number of elements in the schedule queue.
queues | The uel_sysqueues_t instance whose schedule queue's elements should be counted |
void uel_sysqueues_enqueue_event | ( | uel_sysqueues_t * | queues, |
uel_event_t * | event | ||
) |
Pushes an event into the event queue.
This makes the event ready for colletion e processing by the event loop.
queues | The uel_sysqueues_t instance to be initialised |
event | The event to be enqueued |
uel_event_t* uel_sysqueues_get_enqueued_event | ( | uel_sysqueues_t * | queues | ) |
Pops an event from the event queue.
queues | The uel_sysqueues_t instance from whose event queue the event must be popped. |
uel_event_t* uel_sysqueues_get_scheduled_event | ( | uel_sysqueues_t * | queues | ) |
Pops an event from the schedule queue.
queues | The uel_sysqueues_t instance from whose schedule queue the event must be popped. |
void uel_sysqueues_init | ( | uel_sysqueues_t * | queues | ) |
Initialises a new uel_sysqueues_t.
queues | The uel_sysqueues_t instance to be initialised |
void uel_sysqueues_schedule_event | ( | uel_sysqueues_t * | queues, |
uel_event_t * | event | ||
) |
Pushes an event into the schedule queue.
This makes the event ready for collection and scheduling by the scheduler.
queues | The uel_sysqueues_t instance to be initialised |
event | The event to be scheduled |