From 7d196ffc570b4c60c316cf89c3fda9ef7db32176 Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Thu, 24 Oct 2024 22:30:38 +0100 Subject: [PATCH] adjust spacing around brackets to fit styling conventions --- src/threads/thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/threads/thread.c b/src/threads/thread.c index 7d27f1c..5ae0a09 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -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)