Update setting of thread priorities to yield in case a higher priority thread requires control

This commit is contained in:
Themis Demetriades
2024-10-15 15:14:05 +01:00
parent 54b46806ba
commit 3c1a26b668

View File

@@ -358,6 +358,7 @@ thread_set_priority (int new_priority)
{
ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX);
thread_current ()->priority = new_priority;
thread_yield ();
}
/* Returns the current thread's priority. */