Fix attempt to donate priority within lock acquisition w/ S

This commit is contained in:
Themis Demetriades
2024-10-20 19:45:05 +01:00
parent 343ac55d37
commit ee0cf632b9

View File

@@ -226,6 +226,7 @@ lock_acquire (struct lock *lock)
if (lock->holder != NULL) if (lock->holder != NULL)
{ {
t->waiting_lock = lock; t->waiting_lock = lock;
donate_priority (t, lock->holder);
} }
sema_down (&lock->semaphore); sema_down (&lock->semaphore);