µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
Events are special messages passed around the core. They represent tasks to be run at some point by the system. More...
Data Structures | |
union | uel_event_detail |
Data Fields | |
uel_event_type_t | type |
The type of the event, as defined by uel_event_type_t | |
uel_closure_t | closure |
The closure to be invoked a.k.a. the action to be run. | |
void * | value |
The value the closure should be invoked with. | |
bool | repeating |
Marks whether the event should be discarded after processing. | |
union event::uel_event_detail | detail |
Represents speciffic detail on a event depending on its type. | |
Events are special messages passed around the core. They represent tasks to be run at some point by the system.
Events are bound to information on how and when they should be invoked. There are five types of events:
UEL_CLOSURE_EVENT
: lifeless wrappers to closures.UEL_TIMER_EVENT
: contains scheduling information associated with some closureUEL_SIGNAL_EVENT
: contains information on the emission of a signalUEL_SIGNAL_LISTENER_EVENT
: represent a single listening operationUEL_OBSERVER_EVENT
: represents a variable being observer by the event loopClosure and timer events can be recurring, in which case they won't be discarded after processing by the event loop.
Signal events are always discarded by the event loop. Signal listeners are never meant to be sent there. In their case, the repeating
flag determines whether the signal should be able to fire multiple times or just once.