Update set priority so not to yield if no ready threads

This commit is contained in:
sBubshait
2024-10-17 19:46:10 +01:00
parent 711efdc78a
commit bfdedc53e2

View File

@@ -383,7 +383,7 @@ thread_set_priority (int new_priority)
thread_current ()->priority = new_priority; thread_current ()->priority = new_priority;
if (new_priority < old_priority) if (new_priority < old_priority && !list_empty (&ready_list))
thread_yield (); thread_yield ();
} }