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
2 changed files with 30 additions and 0 deletions
Showing only changes of commit 1c53790ca7 - Show all commits

View File

@@ -374,6 +374,9 @@ priority_more (const struct list_elem *a_, const struct list_elem *b_,
void void
thread_set_priority (int new_priority) thread_set_priority (int new_priority)
{ {
ASSERT (new_priority >= PRI_MIN);
ASSERT (new_priority <= PRI_MAX);
thread_current ()->priority = new_priority; thread_current ()->priority = new_priority;
} }