Barrelfish
|
Dispatcher architecture-specific implementation. More...
Functions | |
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. 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_arch_init (dispatcher_handle_t handle) |
Architecture-specific dispatcher initialisation. | |
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.
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.
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.
disp | Current dispatcher pointer |
from_regs | Location to save current register state |
to_regs | Location from which to resume new register state |