From 840df8af78bc6e343cf69fb0866d110fefcda26b Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Sun, 20 Oct 2024 22:29:20 +0100 Subject: [PATCH] Fix bug in donate_priority that wouldn't update the list of donors w/ S --- src/threads/synch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/threads/synch.c b/src/threads/synch.c index 027018e..cdfb2dc 100644 --- a/src/threads/synch.c +++ b/src/threads/synch.c @@ -189,6 +189,8 @@ lock_init (struct lock *lock) static void donate_priority (struct thread *donor, struct thread *donee) { + list_push_back (&donee->donors_list, &donor->donor_elem); + while (donee != NULL) { if (donor->priority <= donee->priority)