kernel: irq: take() previous process pair

This prevents us from continuously resuming the same task

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-03-27 16:21:46 +08:00
parent beea92ddab
commit cfe7c4a3bc

View file

@ -177,7 +177,7 @@ pub extern "C" fn trap_handler(
// we're in an interrupt context, it is safe to access this
// global variable.
let (previous_pid, previous_context) = unsafe {
PREVIOUS_PAIR.expect("got an instruction page fault with no previous PID")
PREVIOUS_PAIR.take().expect("got an instruction page fault with no previous PID")
};
println!(
"ISR: Resuming previous pair of ({}, {})",