From ee0cf632b9018b021c9393b5474a5232948bb2e4 Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Sun, 20 Oct 2024 19:45:05 +0100 Subject: [PATCH] Fix attempt to donate priority within lock acquisition w/ S --- src/threads/synch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/threads/synch.c b/src/threads/synch.c index 3495ca8..6d71c83 100644 --- a/src/threads/synch.c +++ b/src/threads/synch.c @@ -226,6 +226,7 @@ lock_acquire (struct lock *lock) if (lock->holder != NULL) { t->waiting_lock = lock; + donate_priority (t, lock->holder); } sema_down (&lock->semaphore);