µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
Go to the documentation of this file.
21 UEL_SIGNAL_LISTENER_EVENT,
57 typedef struct event uel_event_t;
112 uel_closure_t *closure,
127 uel_llist_t *listeners,
150 uel_closure_t *closure,
151 volatile uintptr_t *condition_var,
175 uint16_t timeout_in_ms,
178 uel_closure_t *closure,
180 uint32_t current_time
Defines a simple implementation of linked lists and functions to manipulate it.
uel_llist_t * listeners
Reference to the signal listeners.
Definition: event.h:81
uintptr_t value
The integer value that identifies this signal.
Definition: event.h:80
void * value
The value the closure should be invoked with.
Definition: event.h:61
bool unlistened
Definition: event.h:89
uintptr_t last_value
Definition: event.h:95
Defines closures, objects that bind functions to creating and calling contexts.
void uel_event_timer_pause(uel_event_t *event)
Pauses a timer event.
Events are special messages passed around the core. They represent tasks to be run at some point by t...
Definition: event.h:58
uel_event_type_t type
The type of the event, as defined by uel_event_type_t
Definition: event.h:59
struct event::uel_event_detail::uel_event_signal signal
The emission information of this event. Relevant only for signals.
enum uel_event_timer_status uel_event_timer_status_t
Alias to the uel_event_timer_status.
Definition: event.h:35
void uel_event_timer_cancel(uel_event_t *event)
Cancels a timer event.
volatile uintptr_t * condition_var
The address of a volatile value to observe.
Definition: event.h:94
union event::uel_event_detail detail
Represents speciffic detail on a event depending on its type.
enum uel_event_type uel_event_type_t
Alias to the uel_event_type enum.
Definition: event.h:25
Contains the context of a particular signal listener.
Definition: event.h:85
void uel_event_observer_cancel(uel_event_t *event)
Cancels an observer.
void uel_event_config_signal(uel_event_t *event, uintptr_t signal, uel_llist_t *listeners, void *params)
Configures a signal event.
struct event::uel_event_detail::uel_event_listener listener
The listening information of this event. Relevant only for signal listeners.
void uel_event_config_timer(uel_event_t *event, uint16_t timeout_in_ms, bool repeating, bool immediate, uel_closure_t *closure, void *value, uint32_t current_time)
Configures a timer event.
void uel_event_config_observer(uel_event_t *event, uel_closure_t *closure, volatile uintptr_t *condition_var, bool repeating)
Configures an observer event.
uint32_t due_time
The value the system timer must be at when this event's closure should be invoked....
Definition: event.h:73
uel_event_timer_status_t status
Current timer status.
Definition: event.h:75
bool repeating
Marks whether the event should be discarded after processing.
Definition: event.h:62
Contains information related to an emitted signal.
Definition: event.h:79
Contains information suitable for scheduling an event at the scheduler.
Definition: event.h:69
bool cancelled
Whether this observer has been cancelled and is awaiting for destruction.
Definition: event.h:97
struct event::uel_event_detail::uel_event_timer timer
The scheduling information of this event. Relevant only for timers.
void uel_event_timer_resume(uel_event_t *event)
Resumes a paused timer event.
void uel_event_config_closure(uel_event_t *event, uel_closure_t *closure, void *value, bool repeating)
Configures a closure event.
uel_event_type
Possible types of events understood by the core.
Definition: event.h:17
Contains the reference to an observer variable.
Definition: event.h:93
uel_closure_t closure
The closure to be invoked a.k.a. the action to be run.
Definition: event.h:60
struct event::uel_event_detail::uel_event_observer observer
The observing information of this event. Relevant only for observers.
uel_event_timer_status
Possible statuses for a timer event.
Definition: event.h:29
void uel_event_config_signal_listener(uel_event_t *event, uel_closure_t *closure, bool repeating)
Configures a signal listener event.
uint16_t timeout
Holds the interval between two executions of the timer.
Definition: event.h:74