summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 14:52:52 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 14:52:52 +0100
commitfcccf780db4cdc23858c108c6cde1d08360ee88f (patch)
tree6e9d871860fe4a6f415b95f7d77d2ac5bf9275a2 /Private/Source
parent1f0cdb9f4ad64623ae8434a81fcbe8d37a5c8164 (diff)
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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/ProcessManager.cxx2
-rw-r--r--Private/Source/RuntimeCheck.cxx9
-rw-r--r--Private/Source/Utils.cxx2
3 files changed, 8 insertions, 5 deletions
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 <NewKit/RuntimeCheck.hpp>
#include <NewKit/String.hpp>
-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) {