Parcourir la source

didn't do a while

tarfeef101 il y a 7 ans
Parent
commit
de006e8ac8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      kern/thread/synch.c

+ 1 - 1
kern/thread/synch.c

@@ -189,7 +189,7 @@ void lock_acquire(struct lock * lock)
   
   spinlock_acquire(&(lock->spin));
   
-  if (lock->owner)
+  while (lock->owner)
   {
     wchan_lock(lock->wc);
     spinlock_release(&(lock->spin));