Barrelfish
|
Event queue implementatino. More...
Functions | |
void | event_queue_init (struct event_queue *q, 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_flush (struct event_queue *q) |
Flush all pending events from the 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... | |
Event queue implementatino.
This code implements a thread-safe queue of pending events which are serviced by a single waitset.
[!] WARNING: current realization of event queues is unsuitable for cross-core operation. Crux of the issue: trigger channel for waitset belonging to another core but waitsets are assumed to be local to a dispatcher.
Example scenario:
For further details see: https://lists.inf.ethz.ch/mailman/private/barrelfish/2013/002746.html
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.
q | Event queue |
qn | Storage for queue node (uninitialised) |
event | Event closure |
errval_t event_queue_cancel | ( | struct event_queue * | q, |
struct event_queue_node * | qn | ||
) |
Cancel an event previously added to an event queue.
q | Event queue |
qn | Queue 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.
q | Event queue. |
void event_queue_init | ( | struct event_queue * | q, |
struct waitset * | waitset, | ||
enum event_queue_mode | mode | ||
) |
Initialise a new event queue.
q | Storage for event queue |
waitset | Waitset that will service the queue |
mode | Operating 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.
q | Event queue |