Barrelfish
Enumerations | Functions
event_queue.h File Reference

Event queue. More...

Enumerations

Functions

void event_queue_init (struct event_queue *evq, struct waitset *waitset, enum event_queue_mode mode)
 Initialise a new event queue. More...
 
void event_queue_add (struct event_queue *q, struct event_queue_node *qn, struct event_closure event)
 Add a new event to an event queue. More...
 
errval_t event_queue_cancel (struct event_queue *q, struct event_queue_node *qn)
 Cancel an event previously added to an event queue. More...
 
errval_t event_queue_trigger (struct event_queue *q)
 Trigger the next event on a queue which is operating in one-shot mode. More...
 
errval_t event_queue_flush (struct event_queue *q)
 Flush all pending events from the event queue. More...
 

Detailed Description

Event queue.

Enumeration Type Documentation

What mode does an event queue operate in?

Enumerator
EVENT_QUEUE_CONTINUOUS 

Run events continuously, as the waitset allows.

EVENT_QUEUE_ONESHOT 

Trigger one event at a time, when event_queue_trigger() is called.

Function Documentation

void event_queue_add ( struct event_queue *  q,
struct event_queue_node *  qn,
struct event_closure  event 
)

Add a new event to an event queue.

Parameters
qEvent queue
qnStorage for queue node (uninitialised)
eventEvent closure
errval_t event_queue_cancel ( struct event_queue *  q,
struct event_queue_node *  qn 
)

Cancel an event previously added to an event queue.

Parameters
qEvent queue
qnQueue node which was previously added to #q by event_queue_add()
errval_t event_queue_flush ( struct event_queue *  q)

Flush all pending events from the event queue.

Parameters
qEvent queue.
void event_queue_init ( struct event_queue *  q,
struct waitset waitset,
enum event_queue_mode  mode 
)

Initialise a new event queue.

Parameters
qStorage for event queue
waitsetWaitset that will service the queue
modeOperating mode for the queue
errval_t event_queue_trigger ( struct event_queue *  q)

Trigger the next event on a queue which is operating in one-shot mode.

Must not be called before the previously-triggered event has run.

Parameters
qEvent queue