Barrelfish
Functions
ump_chan.c File Reference

Bidirectional UMP channel implementation. More...

Functions

errval_t ump_chan_init (struct ump_chan *uc, volatile void *inbuf, size_t inbufsize, volatile void *outbuf, size_t outbufsize)
 Initialise a new UMP channel. More...
 
void ump_chan_destroy (struct ump_chan *uc)
 Destroy the local state associated with a given channel.
 
errval_t ump_chan_bind (struct ump_chan *uc, struct ump_bind_continuation cont, struct event_queue_node *qnode, iref_t iref, struct monitor_binding *monitor_binding, size_t inchanlen, size_t outchanlen, struct capref notify_cap)
 Initialise a new UMP channel and initiate a binding. More...
 
errval_t ump_chan_accept (struct ump_chan *uc, uintptr_t mon_id, struct capref frame, size_t inchanlen, size_t outchanlen)
 Initialise a new UMP channel to accept an incoming binding request. More...
 
void ump_init (void)
 Initialise the UMP channel driver.
 

Detailed Description

Bidirectional UMP channel implementation.

Function Documentation

errval_t ump_chan_accept ( struct ump_chan uc,
uintptr_t  mon_id,
struct capref  frame,
size_t  inchanlen,
size_t  outchanlen 
)

Initialise a new UMP channel to accept an incoming binding request.

Parameters
ucStorage for channel state
mon_idMonitor's connection ID for this channel
frameFrame capability containing channel
inchanlenSize of incoming channel, in bytes (multiple of UMP_MSG_BYTES)
outchanlenSize of outgoing channel, in bytes (multiple of UMP_MSG_BYTES)
errval_t ump_chan_bind ( struct ump_chan uc,
struct ump_bind_continuation  cont,
struct event_queue_node *  qnode,
iref_t  iref,
struct monitor_binding *  monitor_binding,
size_t  inchanlen,
size_t  outchanlen,
struct capref  notify_cap 
)

Initialise a new UMP channel and initiate a binding.

Parameters
ucStorage for channel state
contContinuation for bind completion/failure
qnodeStorage for an event queue node (used for queuing bind request)
irefIREF to which to bind
monitor_bindingMonitor binding to use
inchanlenSize of incoming channel, in bytes (rounded to UMP_MSG_BYTES)
outchanlenSize of outgoing channel, in bytes (rounded to UMP_MSG_BYTES)
notify_capCapability to use for notifications, or #NULL_CAP
errval_t ump_chan_init ( struct ump_chan uc,
volatile void *  inbuf,
size_t  inbufsize,
volatile void *  outbuf,
size_t  outbufsize 
)

Initialise a new UMP channel.

Most code should be using one of ump_chan_bind() or ump_chan_accept().

Parameters
ucStorage for channel state
inbufPointer to incoming message buffer
inbufsizeSize of inbuf in bytes (must be multiple of UMP message size)
outbufPointer to outgoing message buffer
outbufsizeSize of outbuf in bytes (must be multiple of UMP message size)