Barrelfish
Typedefs | Functions
multihop_chan.h File Reference

Bidirectional Multi-hop channel. More...

Typedefs

typedef uint64_t multihop_vci_t
 Virtual circuit identifier.
 

Functions

errval_t multihop_chan_bind (struct multihop_chan *mc, struct multihop_bind_continuation cont, iref_t iref, struct waitset *waitset)
 Initialize a new multihop channel. More...
 
void multihop_chan_send_bind_reply (struct multihop_chan *mc, errval_t err, multihop_vci_t vci, struct waitset *waitset)
 Send a reply back to the monitor. If the error code indicates success, this function creates a new monitor binding and registers to receive messages. More...
 
void multihop_init (void)
 Initialize the multi-hop interconnect driver.
 
errval_t multihop_chan_change_waitset (struct multihop_chan *mc, struct waitset *ws)
 
errval_t multihop_chan_register_send (struct multihop_chan *mc, struct waitset *ws, struct event_closure cont)
 register a continuation closure to be invoked on the given waitset when the multi-hop channel may be able to accept the next message
 
bool multihop_chan_is_window_full (struct multihop_chan *mc)
 Is the send window full?
 
errval_t multihop_send_message (struct multihop_chan *mc, struct event_closure _continuation, void *msg, size_t msglen)
 Send a multi-hop message. More...
 
errval_t multihop_send_capability (struct multihop_chan *mc, struct event_closure _continuation, struct flounder_cap_state *cap_state, struct capref cap)
 Send a capability over the multi-hop channel. More...
 

Detailed Description

Bidirectional Multi-hop channel.

Function Documentation

errval_t multihop_chan_bind ( struct multihop_chan *  mc,
struct multihop_bind_continuation  cont,
iref_t  iref,
struct waitset waitset 
)

Initialize a new multihop channel.

Parameters
mcStorrage for the multihop channel state
contContinuation for bind completion/failure
irefIREF of the service to which we want to bind
waitsetto use
errval_t multihop_chan_change_waitset ( struct multihop_chan *  mc,
struct waitset ws 
)

\ brief Change the waitset of the multi-hop channel

Parameters
mcpointer to the multi-hop channel
wsthe new waitset
void multihop_chan_send_bind_reply ( struct multihop_chan *  mc,
errval_t  msgerr,
multihop_vci_t  vci,
struct waitset waitset 
)

Send a reply back to the monitor. If the error code indicates success, this function creates a new monitor binding and registers to receive messages.

Parameters
multihop_chan
errerror code to send back
vcimy vci for ingoing messages
waitsetwaitset to use for the channel
errval_t multihop_send_capability ( struct multihop_chan *  mc,
struct event_closure  _continuation,
struct flounder_cap_state cap_state,
struct capref  cap 
)

Send a capability over the multi-hop channel.

Parameters
mcpointer to the multi-hop channel
_continuationcallback to be executed after the message is sent
cap_statepointer to the cap state of the channel
capthe capability to send
errval_t multihop_send_message ( struct multihop_chan *  mc,
struct event_closure  _continuation,
void *  msg,
size_t  msglen 
)

Send a multi-hop message.

Parameters
mcpointer to the multi-hop channel
_continuationcallback to be executed after the message is sent
msgpointer to the message payload
msglenlength of the message payload (in bytes)