From a29f410a6637c7eedb942b2a4cd1016a8fc35042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Wed, 8 Mar 2023 15:46:27 +0100 Subject: [PATCH] small fix --- src/kernel/synch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/synch.rs b/src/kernel/synch.rs index 8a7fe98..a2038e6 100644 --- a/src/kernel/synch.rs +++ b/src/kernel/synch.rs @@ -26,7 +26,7 @@ impl Semaphore{ pub fn v(&mut self, current_thread:Rc, machine: &mut Machine){ let old_status = machine.interrupt.set_status(InterruptOff); self.counter-=1; - if self.waiting_queue.peek == None { + if self.waiting_queue.peek() == None { self.waiting_queue.push(Rc::clone(¤t_thread)); current_thread.sleep(); }