small fix

This commit is contained in:
Rémi Rativel 2023-03-08 15:46:27 +01:00 committed by François Autin
parent 5465267f3c
commit aad2ecbd4c
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

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();
}