small fix

This commit is contained in:
Rémi Rativel 2023-03-08 15:46:27 +01:00
parent d03bb47131
commit a29f410a66

View File

@ -26,7 +26,7 @@ impl Semaphore{
pub fn v(&mut self, current_thread:Rc<Thread>, 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(&current_thread));
current_thread.sleep();
}