small fix
This commit is contained in:
parent
d03bb47131
commit
a29f410a66
@ -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(¤t_thread));
|
||||
current_thread.sleep();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user