From c2484838c1f694e394f3689af2961e8108f4c589 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 22 Aug 2021 19:03:16 +0200 Subject: [PATCH] kernel.(c|h) moved debugging code into if (DEBUGGING) section and cleaned up whitespace --- kernel.c | 14 +++++++++----- kernel.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/kernel.c b/kernel.c index 1bbaaae..4766c58 100644 --- a/kernel.c +++ b/kernel.c @@ -23,7 +23,7 @@ extern void init() read_binary_table(); - scheduler_run_next(); + scheduler_run_next(); } void read_binary_table() @@ -38,10 +38,14 @@ void read_binary_table() for (int i = 0; i < NUM_BINARIES; i++) { if (binary_table[i].binid == 0) break; - // print message - msg[18] = (char) binary_table[i].binid + '0'; - msg[27] = (char) i + '0'; - dbgln(msg, 28); + + if (DEBUGGING) { + // print message + msg[18] = (char) binary_table[i].binid + '0'; + msg[27] = (char) i + '0'; + dbgln(msg, 28); + } + info.allocate_memory_start = binary_table[i].bounds[1]; } diff --git a/kernel.h b/kernel.h index 0fcb60e..f21e066 100644 --- a/kernel.h +++ b/kernel.h @@ -5,7 +5,7 @@ #define false 0 #define PROCESS_COUNT 8 // number of concurrent processes -#define NUM_BINARIES 4 // number of binaries loaded simultaneously +#define NUM_BINARIES 4 // number of binaries loaded simultaneously // scheduler settings #define TIME_SLICE_LEN 10 // number of cpu time ticks per slice