Browse Source

didn't do a while

tarfeef101 6 năm trước cách đây
mục cha
commit
de006e8ac8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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));