Barrelfish
|
Dispatcher architecture-specific implementation. More...
Functions | |
void | disp_arch_init (dispatcher_handle_t handle) |
Architecture-specific dispatcher initialisation. | |
void | disp_resume (dispatcher_handle_t handle, arch_registers_state_t *archregs) |
Resume execution of a given register state. More... | |
void | disp_switch (dispatcher_handle_t handle, arch_registers_state_t *from_state, arch_registers_state_t *to_state) |
Switch execution between two register states, and turn off disabled activations. More... | |
void | disp_save (dispatcher_handle_t handle, arch_registers_state_t *state, bool yield, capaddr_t yield_to) |
Save the current register state and optionally yield the CPU. More... | |
void | disp_save_rm_kcb (void) |
Save register state, remove our KCB from current CPU. | |
Dispatcher architecture-specific implementation.
void disp_resume | ( | dispatcher_handle_t | handle, |
arch_registers_state_t * | archregs | ||
) |
Resume execution of a given register state.
This function resumes the execution of the given register state on the current dispatcher. It may only be called while the dispatcher is disabled.
disp | Current dispatcher pointer |
regs | Register state snapshot |
void disp_save | ( | dispatcher_handle_t | handle, |
arch_registers_state_t * | state, | ||
bool | yield, | ||
capaddr_t | yield_to | ||
) |
Save the current register state and optionally yield the CPU.
This function saves as much as necessary of the current register state (which, when resumed will return to the caller), and then either re-enters the thread scheduler or yields the CPU. It may only be called while the dispatcher is disabled. Note that the thread context saved is a voluntary save so only callee save registers need to be saved, but we dont currently provide any way to optimise the corresponding resume.
disp | Current dispatcher pointer |
regs | Location to save current register state |
yield | If true, yield CPU to kernel; otherwise re-run thread scheduler |
yield_to | Endpoint capability for dispatcher to which we want to yield |
void disp_switch | ( | dispatcher_handle_t | handle, |
arch_registers_state_t * | from_state, | ||
arch_registers_state_t * | to_state | ||
) |
Switch execution between two register states, and turn off disabled activations.
This function saves as much as necessary of the current register state (which, when resumed will return to the caller), and switches execution by resuming the given register state. It may only be called while the dispatcher is disabled. A side effect is that activations are reenabled. Note that the thread context saved is a voluntary save so only callee save registers need to be saved, but we dont currently provide any way to optimise the corresponding resume.
disp | Current dispatcher pointer |
from_regs | Location to save current register state |
to_regs | Location from which to resume new register state |