Update setting of thread priorities to yield in case a higher priority thread requires control
This commit is contained in:
@@ -358,6 +358,7 @@ thread_set_priority (int new_priority)
|
|||||||
{
|
{
|
||||||
ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX);
|
ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX);
|
||||||
thread_current ()->priority = new_priority;
|
thread_current ()->priority = new_priority;
|
||||||
|
thread_yield ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the current thread's priority. */
|
/* Returns the current thread's priority. */
|
||||||
|
|||||||
Reference in New Issue
Block a user