adjust spacing around brackets to fit styling conventions
This commit is contained in:
@@ -167,7 +167,7 @@ thread_tick (void)
|
||||
size_t ready = threads_ready ();
|
||||
if (t != idle_thread)
|
||||
ready++;
|
||||
fp32_t old_coeff = fp_div_int (fp_mul_int(load_avg, 59), 60);
|
||||
fp32_t old_coeff = fp_div_int (fp_mul_int (load_avg, 59), 60);
|
||||
fp32_t new_coeff = fp_div_int (fp_from_int (ready), 60);
|
||||
load_avg = fp_add (old_coeff, new_coeff);
|
||||
|
||||
@@ -293,7 +293,7 @@ thread_unblock (struct thread *t)
|
||||
ASSERT (t->status == THREAD_BLOCKED);
|
||||
|
||||
/* Insert the thread back into the ready list in priority order. */
|
||||
list_insert_ordered(&ready_list, &t->elem, priority_more, NULL);
|
||||
list_insert_ordered (&ready_list, &t->elem, priority_more, NULL);
|
||||
|
||||
t->status = THREAD_READY;
|
||||
intr_set_level (old_level);
|
||||
@@ -368,7 +368,7 @@ thread_yield (void)
|
||||
if (cur != idle_thread)
|
||||
{
|
||||
/* 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;
|
||||
@@ -726,7 +726,7 @@ static int
|
||||
calculate_bsd_priority (fp32_t recent_cpu, int nice)
|
||||
{
|
||||
|
||||
ASSERT(thread_mlfqs);
|
||||
ASSERT (thread_mlfqs);
|
||||
|
||||
int priority = PRI_MAX - (fp_round (recent_cpu) / 4) - (nice * 2);
|
||||
if (priority < PRI_MIN)
|
||||
|
||||
Reference in New Issue
Block a user