fix missing curly brace
This commit is contained in:
@@ -372,11 +372,15 @@ thread_yield (void)
|
|||||||
if (cur != idle_thread)
|
if (cur != idle_thread)
|
||||||
{
|
{
|
||||||
if (thread_mlfqs)
|
if (thread_mlfqs)
|
||||||
|
{
|
||||||
list_insert_ordered (&ready_list, &cur->elem, thread_priority_less,
|
list_insert_ordered (&ready_list, &cur->elem, thread_priority_less,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
/* Insert the thread back into the ready list in priority order. */
|
/* Insert the thread back into the ready list in priority order. */
|
||||||
list_insert_ordered(&ready_list, &cur->elem, priority_more, NULL);
|
list_insert_ordered(&ready_list, &cur->elem, priority_more, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur->status = THREAD_READY;
|
cur->status = THREAD_READY;
|
||||||
@@ -473,7 +477,7 @@ thread_update_recent_cpu (struct thread *t, void *aux UNUSED)
|
|||||||
= fp_add_int (fp_mul (recent_cpu_coeff, curr_recent_cpu), t->nice);
|
= fp_add_int (fp_mul (recent_cpu_coeff, curr_recent_cpu), t->nice);
|
||||||
// recent_cpu was updated, update priority.
|
// recent_cpu was updated, update priority.
|
||||||
t->priority = calculate_bsd_priority (t->recent_cpu, t->nice);
|
t->priority = calculate_bsd_priority (t->recent_cpu, t->nice);
|
||||||
|
}
|
||||||
/* Recalculates the effective priority of the current thread. */
|
/* Recalculates the effective priority of the current thread. */
|
||||||
void
|
void
|
||||||
thread_recalculate_priority (void)
|
thread_recalculate_priority (void)
|
||||||
|
|||||||
Reference in New Issue
Block a user