diff --git a/src/kernel/exception.rs b/src/kernel/exception.rs index a396718..c260d3c 100644 --- a/src/kernel/exception.rs +++ b/src/kernel/exception.rs @@ -197,6 +197,11 @@ fn syscall(machine: &mut Machine, system: &mut System) -> Result Result{ + let id = machine.read_int_register(10) as i32; + system.get_thread_manager().lock_release(id, machine) +} + fn sc_lock_acquire(machine: &mut Machine, system: &mut System) -> Result { let id = machine.read_int_register(10) as i32; system.get_thread_manager().lock_acquire(id, machine) diff --git a/src/kernel/thread_manager.rs b/src/kernel/thread_manager.rs index 870a9fc..26911b8 100644 --- a/src/kernel/thread_manager.rs +++ b/src/kernel/thread_manager.rs @@ -282,6 +282,10 @@ impl ThreadManager { } } + pub fn lock_release(&mut self, id: i32, machine: &mut Machine) -> Result{ + todo!() + } + /// Currently running thread pub fn get_g_current_thread(&mut self) -> &Option>> { &self.g_current_thread