36#ifndef EVENT_CALLBACK_H
37#define EVENT_CALLBACK_H
51 void (*callback)(
void*);
95 void (*callback)(
void *),
void *arg)
116#define EVENT_CALLBACK_INIT(_cb, _arg) \
118 .super.handler = _event_callback_handler, \
120 .arg = (void *)_arg \
POSIX.1-2008 compliant version of the assert macro.
#define assert(cond)
abort the program if assertion is false
static void event_callback_oneshot(event_callback_t *event, event_queue_t *queue, void(*callback)(void *), void *arg)
Generate a one-shot callback event on queue.
void event_callback_init(event_callback_t *event_callback, void(*callback)(void *), void *arg)
event callback initialization function
static void event_callback_post(event_queue_t *queue, event_callback_t *event)
Queue an event.
void _event_callback_handler(event_t *event)
event callback handler function (used internally)
void event_post(event_queue_t *queue, event_t *event)
Queue an event.
Callback Event structure definition.
event_t super
event_t structure that gets extended
void * arg
callback function argument