From 4f99b6217fbfd6c43037aa090951691a1daa4d1c Mon Sep 17 00:00:00 2001 From: Enrico Fraccaroli Date: Thu, 19 Jan 2023 09:58:31 -0500 Subject: [PATCH] Unify debugging setup in system folder files. --- mentos/src/system/signal.c | 12 +++++------- mentos/src/system/syscall.c | 11 +++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/mentos/src/system/signal.c b/mentos/src/system/signal.c index 75105bd..0c96772 100644 --- a/mentos/src/system/signal.c +++ b/mentos/src/system/signal.c @@ -3,12 +3,11 @@ /// @copyright (c) 2014-2022 This file is distributed under the MIT License. /// See LICENSE.md for details. -// Include the kernel log levels. -#include "sys/kernel_levels.h" -/// Change the header. -#define __DEBUG_HEADER__ "[SIGNAL]" -/// Set the log level. -#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE +// Setup the logging for this file (do this before any other include). +#include "sys/kernel_levels.h" // Include kernel log levels. +#define __DEBUG_HEADER__ "[SIGNAL]" ///< Change header. +#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE ///< Set log level. +#include "io/debug.h" // Include debugging functions. #include "system/signal.h" #include "process/wait.h" @@ -16,7 +15,6 @@ #include "process/process.h" #include "sys/errno.h" #include "assert.h" -#include "io/debug.h" #include "string.h" #include "klib/irqflags.h" #include "klib/stack_helper.h" diff --git a/mentos/src/system/syscall.c b/mentos/src/system/syscall.c index 259866b..e86c750 100644 --- a/mentos/src/system/syscall.c +++ b/mentos/src/system/syscall.c @@ -3,12 +3,11 @@ /// @copyright (c) 2014-2022 This file is distributed under the MIT License. /// See LICENSE.md for details. -// Include the kernel log levels. -#include "sys/kernel_levels.h" -/// Change the header. -#define __DEBUG_HEADER__ "[SYSCLL]" -/// Set the log level. -#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE +// Setup the logging for this file (do this before any other include). +#include "sys/kernel_levels.h" // Include kernel log levels. +#define __DEBUG_HEADER__ "[SYSCLL]" ///< Change header. +#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE ///< Set log level. +#include "io/debug.h" // Include debugging functions. #include "devices/fpu.h" #include "mem/kheap.h"