event.h File Reference

Event API. More...

Detailed Description

Event API.

Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file event.h.

#include <stdint.h>
#include "irq.h"
#include "thread_flags.h"
#include "clist.h"
+ Include dependency graph for event.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  event
 event structure More...
struct  event_queue_t
 event queue structure More...


#define THREAD_FLAG_EVENT   (0x1)
 Thread flag use to notify available events in an event queue.
#define EVENT_QUEUE_INIT   { .waiter = (thread_t *)sched_active_thread }
 event_queue_t static initializer


typedef struct event event_t
 event structure forward declaration
typedef void(* event_handler_t) (event_t *)
 event handler type definition


void event_queue_init (event_queue_t *queue)
 Initialize an event queue. More...
void event_post (event_queue_t *queue, event_t *event)
 Queue an event. More...
void event_cancel (event_queue_t *queue, event_t *event)
 Cancel a queued event. More...
event_tevent_get (event_queue_t *queue)
 Get next event from event queue, non-blocking. More...
event_tevent_wait (event_queue_t *queue)
 Get next event from event queue, blocking. More...
void event_loop (event_queue_t *queue)
 Simple event loop. More...