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/ProcessManager.cxx | 2 +- Private/Source/RuntimeCheck.cxx | 9 ++++++--- Private/Source/Utils.cxx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Private/Source') diff --git a/Private/Source/ProcessManager.cxx b/Private/Source/ProcessManager.cxx index 1bba7f7e..0c552b7f 100644 --- a/Private/Source/ProcessManager.cxx +++ b/Private/Source/ProcessManager.cxx @@ -202,7 +202,7 @@ SizeT ProcessManager::Run() noexcept { ProcessHelper::Switch(m_CurrentProcess.Leak().StackFrame, m_CurrentProcess.Leak().ProcessId); } else { - // otherwise increment the micro-time. + // otherwise increment the P-time. ++m_CurrentProcess.Leak().PTime; } } 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"; diff --git a/Private/Source/Utils.cxx b/Private/Source/Utils.cxx index f843abba..6072ccd3 100644 --- a/Private/Source/Utils.cxx +++ b/Private/Source/Utils.cxx @@ -21,7 +21,7 @@ Int string_compare(const Char *src, const Char *cmp, Size size) { } void rt_zero_memory(voidPtr pointer, Size len) { - rt_set_memory((voidPtr)pointer, 0, len); + rt_set_memory(pointer, 0, len); } Size string_length(const Char *str, SizeT _len) { -- cgit v1.2.3