|
Barrelfish
|
LMP endpoints declarations. More...
Data Structures | |
| struct | lmp_endpoint |
| LMP endpoint structure (including data accessed only by user code) More... | |
| struct | lmp_recv_buf |
| Message layout in user's buffer. More... | |
| struct | lmp_recv_msg |
| Fixed-length version of lmp_recv_buf. More... | |
Macros | |
| #define | LMP_RECV_LENGTH (LMP_MSG_LENGTH + LMP_RECV_HEADER_LENGTH) |
| In-endpoint size of a maximum-sized LMP message plus header. | |
| #define | DEFAULT_LMP_BUF_WORDS (LMP_RECV_LENGTH * 2) |
| Default size of LMP endpoint buffer (in words), must be >= LMP_RECV_LENGTH. | |
| #define | LMP_RECV_BUF_SIZE(n) (sizeof(struct lmp_recv_buf) + ((n)*sizeof(uintptr_t))) |
| Compute the size needed for an lmp_recv_buf buffer. | |
| #define | LMP_RECV_MSG_INIT { .buf.buflen = LMP_MSG_LENGTH }; |
| Static initialiser for lmp_recv_msg. | |
Functions | |
| errval_t | lmp_endpoint_alloc (size_t buflen, struct lmp_endpoint **retep) |
| Allocate an LMP endpoint buffer on the current dispatcher. More... | |
| void | lmp_endpoint_free (struct lmp_endpoint *ep) |
| Free an LMP endpoint buffer on the current dispatcher. More... | |
| errval_t | lmp_endpoint_create_in_slot (size_t buflen, struct capref dest, struct lmp_endpoint **retep) |
| Create endpoint to caller on current dispatcher in a specified slot. More... | |
| void | lmp_endpoint_set_recv_slot (struct lmp_endpoint *ep, struct capref slot) |
| Set the receive capability slot for a given endpoint. More... | |
| bool | lmp_endpoint_can_recv (struct lmp_endpoint *ep) |
| Returns true iff there are messages in the given endpoint buffer. More... | |
| void | lmp_endpoints_poll_disabled (dispatcher_handle_t handle) |
| Check incoming LMP endpoints for messages and notify waitsets. More... | |
| errval_t | lmp_endpoint_recv (struct lmp_endpoint *ep, struct lmp_recv_buf *buf, struct capref *cap) |
| Retrieve an LMP message from an endpoint, if possible. More... | |
| errval_t | lmp_endpoint_register (struct lmp_endpoint *ep, struct waitset *ws, struct event_closure closure) |
| Register an event handler to be notified when messages can be received. More... | |
| errval_t | lmp_endpoint_deregister (struct lmp_endpoint *ep) |
| Cancel an event registration made with lmp_endpoint_register() More... | |
| void | lmp_endpoint_migrate (struct lmp_endpoint *ep, struct waitset *ws) |
| Migrate an event registration made with lmp_endpoint_register() to a new waitset. More... | |
| void | lmp_endpoint_store_lrpc_disabled (struct lmp_endpoint *ep, uint32_t bufpos, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4) |
| Store a newly-received LRPC message into an endpoint buffer. More... | |
| void | lmp_endpoint_init (void) |
| Initialize LMP endpoint subsystem. | |
LMP endpoints declarations.
| errval_t lmp_endpoint_alloc | ( | size_t | buflen, |
| struct lmp_endpoint ** | retep | ||
| ) |
Allocate an LMP endpoint buffer on the current dispatcher.
In order to accomodate for the in-kernel sentinel word, the allocated size of the buffer will be one larger than buflen.
| buflen | Length of incoming LMP buffer, in words |
| retep | Double pointer to LMP endpoint, filled-in with allocated EP |
|
inline |
Returns true iff there are messages in the given endpoint buffer.
May be called enabled or disabled. As a result, when enabled, the result may be incorrect as soon as the function returns.
| errval_t lmp_endpoint_create_in_slot | ( | size_t | buflen, |
| struct capref | dest, | ||
| struct lmp_endpoint ** | retep | ||
| ) |
Create endpoint to caller on current dispatcher in a specified slot.
| buflen | Length of incoming LMP buffer, in words |
| dest | Location of empty slot in which to create endpoint |
| retep | Double pointer to LMP endpoint, filled-in with allocated EP |
This function mints into the given slot an endpoint capability to the current dispatcher.
| errval_t lmp_endpoint_deregister | ( | struct lmp_endpoint * | ep | ) |
Cancel an event registration made with lmp_endpoint_register()
| ep | LMP Endpoint |
| void lmp_endpoint_free | ( | struct lmp_endpoint * | ep | ) |
Free an LMP endpoint buffer on the current dispatcher.
Does not delete the endpoint capability nor free any receive slot.
| ep | LMP endpoint |
| void lmp_endpoint_migrate | ( | struct lmp_endpoint * | ep, |
| struct waitset * | ws | ||
| ) |
Migrate an event registration made with lmp_endpoint_register() to a new waitset.
| ep | LMP Endpoint |
| ws | New waitset |
| errval_t lmp_endpoint_recv | ( | struct lmp_endpoint * | ep, |
| struct lmp_recv_buf * | buf, | ||
| struct capref * | cap | ||
| ) |
Retrieve an LMP message from an endpoint, if possible.
| ep | Endpoint |
| buf | LMP message buffer, to be filled-in |
| cap | If non-NULL, filled-in with location of received capability, if any |
| errval_t lmp_endpoint_register | ( | struct lmp_endpoint * | ep, |
| struct waitset * | ws, | ||
| struct event_closure | closure | ||
| ) |
Register an event handler to be notified when messages can be received.
In the future, call the closure on the given waitset when it is likely that a message can be received on the endpoint. An endpoint may only be registered with a single event handler on a single waitset at any one time.
| ep | LMP endpoint |
| ws | Waitset |
| closure | Event handler |
| void lmp_endpoint_set_recv_slot | ( | struct lmp_endpoint * | ep, |
| struct capref | slot | ||
| ) |
Set the receive capability slot for a given endpoint.
| ep | Endpoint returned from messages_lmp_alloc_endpoint() |
| slot | Receive slot |
| void lmp_endpoint_store_lrpc_disabled | ( | struct lmp_endpoint * | ep, |
| uint32_t | bufpos, | ||
| uintptr_t | arg1, | ||
| uintptr_t | arg2, | ||
| uintptr_t | arg3, | ||
| uintptr_t | arg4 | ||
| ) |
Store a newly-received LRPC message into an endpoint buffer.
Must be called while disabled.
| ep | Endpoint |
| bufpos | Reserved position in endpoint message buffer |
| arg1 | Message payload |
| arg2 | Message payload |
| arg3 | Message payload |
| arg4 | Message payload |
| void lmp_endpoints_poll_disabled | ( | dispatcher_handle_t | handle | ) |
Check incoming LMP endpoints for messages and notify waitsets.
| disp_priv | Dispatcher's private data |
Must be called while disabled.
1.8.11