Refactor thread set priority to remove unused variable and add comment, w/ T

This commit is contained in:
sBubshait
2024-10-22 20:47:34 +01:00
parent 6983ccdd3b
commit bf6104200c

View File

@@ -395,9 +395,8 @@ thread_set_priority (int new_base_priority)
struct thread *t = thread_current ();
int old_base_priority = t->base_priority;
int old_priority = thread_get_priority ();
if (new_base_priority == old_base_priority)
/* If the base priority is unchanged, do nothing. */
if (new_base_priority == t->base_priority)
return;
t->base_priority = new_base_priority;