pub unsafe extern "C" fn context_switch_regular(
    _prev_stack_pointer: *mut usize,
    _next_stack_pointer_value: usize
)
Expand description

Switches context from a regular Task to another regular Task.

Arguments

  • First argument (in RDI): mutable pointer to the previous task’s stack pointer
  • Second argument (in RSI): the value of the next task’s stack pointer

Safety

This function is unsafe because it changes the content on both task’s stacks.