From 510c659355d9227d1b75edfe50c1b8691ea2f982 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 31 Dec 2024 15:24:18 +0100 Subject: IMPL: Better panic screen, fixing CUSA as in the gh issue. Signed-off-by: Amlal El Mahrouss --- dev/Kernel/NewKit/KernelPanic.h | 15 ++++----------- dev/Kernel/NewKit/Utils.h | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'dev/Kernel/NewKit') diff --git a/dev/Kernel/NewKit/KernelPanic.h b/dev/Kernel/NewKit/KernelPanic.h index bc61bd3b..bd119357 100644 --- a/dev/Kernel/NewKit/KernelPanic.h +++ b/dev/Kernel/NewKit/KernelPanic.h @@ -11,7 +11,7 @@ namespace Kernel { - void ke_runtime_check(bool bExpression, const Char* file, const Char* line); + void ke_runtime_check(bool expr, const Char* file, const Char* line); } #define MUST_PASS_COMPILER(EXPR, MSG) static_assert(EXPR, MSG) @@ -29,8 +29,8 @@ namespace Kernel enum RUNTIME_CHECK { - RUNTIME_CHECK_FAILED = -1, - RUNTIME_CHECK_POINTER = 0, + RUNTIME_CHECK_FAILED = 1111, + RUNTIME_CHECK_POINTER, RUNTIME_CHECK_EXPRESSION, RUNTIME_CHECK_FILE, RUNTIME_CHECK_IPC, @@ -50,14 +50,7 @@ enum RUNTIME_CHECK namespace Kernel { - /// @brief Dumping factory class. - class RecoveryFactory final - { - public: - STATIC Void Recover() noexcept; - }; - - void ke_panic(const Int32& id); + void ke_panic(const Int32& id, const Char* message = nullptr); } // namespace Kernel #ifdef TRY diff --git a/dev/Kernel/NewKit/Utils.h b/dev/Kernel/NewKit/Utils.h index fce335c0..af177550 100644 --- a/dev/Kernel/NewKit/Utils.h +++ b/dev/Kernel/NewKit/Utils.h @@ -19,7 +19,7 @@ namespace Kernel const Char* rt_alloc_string(const Char* text); Size rt_string_len(const Char* str); Size rt_string_len(const Char* str, SizeT _len); - Boolean rt_to_string(Char* buf, Int limit, Int base); + Boolean rt_to_string(Char* buf, UInt64 base, Int32 limit); Boolean is_newln(Char chr); Boolean is_space(Char chr); Int rt_to_uppercase(Int c); -- cgit v1.2.3