From fcccf780db4cdc23858c108c6cde1d08360ee88f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 3 Feb 2024 14:52:52 +0100 Subject: Kernel: Got stuck at the way I do things, trying another approach see hcore ticket HCR-11 in Jira. Signed-off-by: Amlal El Mahrouss --- Private/Source/RuntimeCheck.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Private/Source/RuntimeCheck.cxx') diff --git a/Private/Source/RuntimeCheck.cxx b/Private/Source/RuntimeCheck.cxx index a84a0b7a..664e3d75 100644 --- a/Private/Source/RuntimeCheck.cxx +++ b/Private/Source/RuntimeCheck.cxx @@ -12,7 +12,7 @@ #include #include -extern "C" [[noreturn]] void wait_for_debugger() { +extern "C" [[noreturn]] void ke_wait_for_debugger() { while (true) { HCore::HAL::rt_cli(); HCore::HAL::rt_halt(); @@ -63,10 +63,13 @@ void ke_stop(const HCore::Int &id) { }; DumpManager::Dump(); - wait_for_debugger(); + +#ifdef __DEBUG__ + ke_wait_for_debugger(); +#endif // ifdef __DEBUG__ } -void runtime_check(bool expr, const char *file, const char *line) { +void ke_runtime_check(bool expr, const char *file, const char *line) { if (!expr) { #ifdef __DEBUG__ kcout << "[KERNEL] Check Failed!\n"; -- cgit v1.2.3