1
0
forked from Rativel/BurritOS

print exit code when using debug machine, add matmult

This commit is contained in:
Quentin Legot
2023-05-09 23:16:16 +02:00
parent 15a04fb9da
commit 98fe63f487
4 changed files with 65 additions and 4 deletions

View File

@@ -248,10 +248,10 @@ impl ThreadManager {
}
/// Finish the execution of the thread and prepare its deallocation
pub fn thread_finish(&mut self, machine: &mut Machine, thread: ThreadRef) {
pub fn thread_finish(&mut self, machine: &mut Machine, thread: ThreadRef, exit_code: i64) {
let old_status = machine.interrupt.set_status(InterruptStatus::InterruptOff);
assert!(self.g_alive.remove(Rc::clone(&thread)));
self.debug(format!("Finishing thread {}", thread.borrow().get_name()));
self.debug(format!("Finishing thread {} with code {}", thread.borrow().get_name(), exit_code));
// g_objets_addrs->removeObject(self.thread) // a ajouté plus tard
for (_, el) in thread.borrow().join_thread.iter().enumerate() {
self.ready_to_run(Rc::clone(&el));