From 1efed3cbec879134d55aee8e13c6bbc6da9b6ef6 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sat, 15 Jun 2024 09:38:25 +0200 Subject: MHR-31: Changes related to ARM64/AMD64: This is the last commit regarding AMD64 support, focusing on ARM64 now. Signed-off-by: Amlal EL Mahrouss --- Kernel/HALKit/AMD64/HalHart.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Kernel/HALKit/AMD64/HalHart.cpp') diff --git a/Kernel/HALKit/AMD64/HalHart.cpp b/Kernel/HALKit/AMD64/HalHart.cpp index 92e075aa..069f3767 100644 --- a/Kernel/HALKit/AMD64/HalHart.cpp +++ b/Kernel/HALKit/AMD64/HalHart.cpp @@ -16,15 +16,19 @@ namespace NewOS { HAL::rt_cli(); + rt_do_context_switch(stack); + HAL::rt_sti(); } - /// @brief makes thread sleep. + /// @brief makes the thread sleep on a loop. /// hooks and hangs thread to prevent code from executing. void rt_hang_thread(HAL::StackFrame* stack) { - HAL::rt_cli(); - - HAL::rt_sti(); + while (true) + { + /* nohing, code is spinning */ + } + } } // namespace NewOS -- cgit v1.2.3