Merge 'task1/priority-donation' into 'master' #14

Merged
sb3923 merged 66 commits from task1/priority-donation into master 2024-10-23 16:15:45 +00:00
4 changed files with 239 additions and 15 deletions
Showing only changes of commit 48104b3a41 - Show all commits

View File

@@ -436,11 +436,12 @@ cond_signal (struct condition *cond, struct lock *lock UNUSED)
if (!list_empty (&cond->waiters))
{
/* Enforce wake-up of highest priority thread within the singleton
semaphores waiting for condvar. */
struct list_elem *e = list_min (&cond->waiters, sema_priority_more, NULL);
list_remove (e);
sema_up (&list_entry (e, struct semaphore_elem, elem)->semaphore);
}
}
/* Wakes up all threads, if any, waiting on COND (protected by