summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalHart.cpp
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 09:38:25 +0200
committerAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 09:38:25 +0200
commit1efed3cbec879134d55aee8e13c6bbc6da9b6ef6 (patch)
treedcd46a37fb228a0e7456dc5e0861efb0a5423de1 /Kernel/HALKit/AMD64/HalHart.cpp
parentce11c1a5252f7cbb52ebecff41522f3c4a30525a (diff)
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 <amlal@softwarelabs.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalHart.cpp')
-rw-r--r--Kernel/HALKit/AMD64/HalHart.cpp12
1 files changed, 8 insertions, 4 deletions
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