diff --git a/src/kernel/exception.rs b/src/kernel/exception.rs index de4defe..17599f2 100644 --- a/src/kernel/exception.rs +++ b/src/kernel/exception.rs @@ -67,9 +67,9 @@ fn syscall(machine: &mut Machine, system: &mut System) -> Result { let th = match &system.get_thread_manager().g_current_thread { Some(th) => th, - None => Err("Current thread is None".into()) - }?; - system.get_thread_manager().thread_finish(machine, th); + None => Err("Current thread is None")? + }; + system.get_thread_manager().thread_finish(machine, *th); Ok(MachineOk::Ok) }, SC_EXEC => todo!(),