Barrelfish
Functions | Variables
dispatch.c File Reference

Kernel management of dispatchers (implementation). More...

Functions

errval_t lmp_can_deliver_payload (struct capability *ep, size_t payload_len)
 Check if it would be possible to deliver LMP payload, but do not deliver it. More...
 
errval_t lmp_deliver_payload (struct capability *ep, struct dcb *send, uintptr_t *payload, size_t payload_len, bool captransfer, bool now)
 Deliver the payload of an LMP message to a dispatcher. More...
 
errval_t lmp_deliver (struct capability *ep, struct dcb *send, uintptr_t *payload, size_t len, capaddr_t send_cptr, uint8_t send_level, bool give_away)
 Deliver an LMP message to a dispatcher. More...
 

Variables

systime_t kernel_timeslice
 The kernel timeslice given in system ticks. More...
 
unsigned int config_timeslice = CONFIG_TIMESLICE
 
uint64_t context_switch_counter = 0
 Counter for number of context switches.
 
struct dcbdcb_current = NULL
 Current execution dispatcher (when in system call or exception) More...
 
struct dcbfpu_dcb = NULL
 Remembered FPU-using DCB (NULL if none)
 

Detailed Description

Kernel management of dispatchers (implementation).

Function Documentation

errval_t lmp_can_deliver_payload ( struct capability *  ep,
size_t  payload_len 
)

Check if it would be possible to deliver LMP payload, but do not deliver it.

Parameters
epEndpoint capability to send to
payload_lenLength (in number of words) of payload
errval_t lmp_deliver ( struct capability *  ep,
struct dcb send,
uintptr_t *  payload,
size_t  len,
capaddr_t  send_cptr,
uint8_t  send_level,
bool  give_away 
)

Deliver an LMP message to a dispatcher.

Parameters
epEndpoint capability to send to
sendDCB of the sender. Can be NULL for kernel-originated messages
payloadBuffer containing message payload
lenLength of message payload, as number of words
send_cptrCapability to be transferred with LMP
send_levelCSpace level of cptr
errval_t lmp_deliver_payload ( struct capability *  ep,
struct dcb send,
uintptr_t *  payload,
size_t  payload_len,
bool  captransfer,
bool  now 
)

Deliver the payload of an LMP message to a dispatcher.

Parameters
epEndpoint capability to send to
sendDCB of the sender. Can be NULL for kernel-originated messages
payloadMessage payload
payload_lenLength (in number of words) of payload
captransferTrue iff a cap has also been delivered
Returns
Error code

Variable Documentation

unsigned int config_timeslice = CONFIG_TIMESLICE

command-line option for kernel timeslice in milliseconds

struct dcb* dcb_current = NULL

Current execution dispatcher (when in system call or exception)

The currently running dispatcher and FPU dispatcher.

systime_t kernel_timeslice

The kernel timeslice given in system ticks.

kernel timeslice in system ticks