From e8114518790526b92f00ade320ceddfb740c6aae Mon Sep 17 00:00:00 2001 From: Stephen Marz Date: Sun, 17 May 2020 17:30:10 -0400 Subject: [PATCH] Clean up context switch code. --- risc_v/src/trap.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/risc_v/src/trap.rs b/risc_v/src/trap.rs index d87e719..2eea731 100755 --- a/risc_v/src/trap.rs +++ b/risc_v/src/trap.rs @@ -52,26 +52,10 @@ extern "C" fn m_trap(epc: usize, // process to run. // Machine timer let new_frame = schedule(); - // let p = frame as *const TrapFrame; - // println!( - // "CTX Startup {}, pc = {:x}", - // (*p).pid, - // (*p).pc - // ); - // print!(" "); - // for i in 1..32 { - // if i % 4 == 0 { - // println!(); - // print!(" "); - // } - // print!("{:2}:{:08x} ", i, (*p).regs[i]); - // } - // println!(); schedule_next_context_switch(1); if new_frame != 0 { rust_switch_to_user(new_frame); } - }, 11 => { // Machine external (interrupt from Platform Interrupt Controller (PLIC))