implemented sc_lock_release
TODO : to implement lock_release in thread_manager
This commit is contained in:
parent
3244584da9
commit
ec2f50f7d3
@ -197,6 +197,11 @@ fn syscall(machine: &mut Machine, system: &mut System) -> Result<MachineOk, Mach
|
||||
}
|
||||
}
|
||||
|
||||
fn sc_lock_release(machine: &mut Machine, system: &mut System) -> Result<MachineOk, MachineError>{
|
||||
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<MachineOk, MachineError> {
|
||||
let id = machine.read_int_register(10) as i32;
|
||||
system.get_thread_manager().lock_acquire(id, machine)
|
||||
|
@ -282,6 +282,10 @@ impl ThreadManager {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn lock_release(&mut self, id: i32, machine: &mut Machine) -> Result<MachineOk, MachineError>{
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Currently running thread
|
||||
pub fn get_g_current_thread(&mut self) -> &Option<Rc<RefCell<Thread>>> {
|
||||
&self.g_current_thread
|
||||
|
Loading…
Reference in New Issue
Block a user