Go to the documentation of this file.
20 #ifndef DPL_DPL_EVENTQ_H
21 #define DPL_DPL_EVENTQ_H
event_t super
event_t structure that gets extended
event_callback_t e
the event callback
static struct dpl_eventq * dpl_eventq_dflt_get(void)
Retrieves the default event queue.
void dpl_event_fn(struct dpl_event *ev)
dpl event callback function
clist_node_t list_node
event queue list entry
void event_cancel(event_queue_t *queue, event_t *event)
Cancel a queued event.
event_queue_t * uwb_core_get_eventq(void)
Retrieves the default event queue.
Provides a callback-with-argument event type.
event_queue_t q
the event queue
Callback Event structure definition.
void * arg
the event argument
static void dpl_eventq_run(struct dpl_eventq *evq)
Gets and runs an event from the queue callback.
static struct dpl_event * dpl_eventq_get_no_wait(struct dpl_eventq *evq)
Get next event from event queue, non-blocking.
static void dpl_event_set_arg(struct dpl_event *ev, void *arg)
Set the vent arg.
static void * dpl_event_get_arg(struct dpl_event *ev)
Runs an event.
static void event_queue_init_detached(event_queue_t *queue)
Initialize an event queue not binding it to a thread.
void event_post(event_queue_t *queue, event_t *event)
Queue an event.
static void dpl_event_run(struct dpl_event *ev)
Runs an event.
static struct dpl_event * dpl_eventq_get(struct dpl_eventq *evq)
Get next event from event queue, blocking.
static int dpl_eventq_inited(struct dpl_eventq *evq)
Check whether the event queue is initialized.
static void dpl_eventq_remove(struct dpl_eventq *evq, struct dpl_event *ev)
Remove an event from the queue.
static void dpl_eventq_put(struct dpl_eventq *evq, struct dpl_event *ev)
Put an event on the event queue.
static bool dpl_eventq_is_empty(struct dpl_eventq *evq)
Check if queue is empty.
static void dpl_eventq_deinit(struct dpl_eventq *evq)
Deinitialize an event queue.
static event_t * event_wait(event_queue_t *queue)
Get next event from event queue, blocking.
clist_node_t event_list
list of queued events
struct list_node * next
pointer to next list entry
static bool dpl_event_is_queued(struct dpl_event *ev)
Check if event is in queue.
thread_t * waiter
thread ownning event queue
uwb-core DPL (Decawave Porting Layer) types
static size_t clist_count(clist_node_t *list)
Count the number of items in the given list.
static void dpl_event_init(struct dpl_event *ev, dpl_event_fn *fn, void *arg)
Init a event.
event_handler_t handler
pointer to event handler function
static void dpl_eventq_init(struct dpl_eventq *evq)
Initialize the event queue.
event_t * event_get(event_queue_t *queue)
Get next event from event queue, non-blocking.
static void event_queue_claim(event_queue_t *queue)
Bind an event queue to the calling thread.
void event_callback_init(event_callback_t *event_callback, void(*callback)(void *), void *arg)
event callback initialization function