From b96808b55f51145086e36a723769d54f87ccba16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Wed, 5 Apr 2023 13:44:43 +0200 Subject: [PATCH] Fixed incorrect flow control --- src/kernel/exception.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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!(),