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 173 additions and 10 deletions
Showing only changes of commit 7f7b1648cd - Show all commits

View File

@@ -405,7 +405,8 @@ thread_recalculate_priority (void)
struct thread *t = thread_current ();
t->priority = t->base_priority;
if (!list_empty (&t->donors_list)) {
if (!list_empty (&t->donors_list))
{
int max_donated_priority =
list_entry (list_max (&t->donors_list, priority_more, NULL),
struct thread, donor_elem)->priority;