From 7327f305efb1c6678722308cc5f9645dd39f451e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 13 Jun 2024 19:38:29 +0200 Subject: MHR-31: Lots of fixes and improvements regarding the kernel. Signed-off-by: Amlal El Mahrouss --- Kernel/HALKit/AMD64/HalHart.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Kernel/HALKit/AMD64/HalHart.cpp (limited to 'Kernel/HALKit/AMD64/HalHart.cpp') diff --git a/Kernel/HALKit/AMD64/HalHart.cpp b/Kernel/HALKit/AMD64/HalHart.cpp new file mode 100644 index 00000000..92e075aa --- /dev/null +++ b/Kernel/HALKit/AMD64/HalHart.cpp @@ -0,0 +1,30 @@ +/* ------------------------------------------- + + Copyright Zeta Electronics Corporation + +------------------------------------------- */ + +#include + +// bugs = 0 + +namespace NewOS +{ + /// @brief wakes up thread. + /// wakes up thread from hang. + void rt_wakeup_thread(HAL::StackFrame* stack) + { + HAL::rt_cli(); + + HAL::rt_sti(); + } + + /// @brief makes thread sleep. + /// hooks and hangs thread to prevent code from executing. + void rt_hang_thread(HAL::StackFrame* stack) + { + HAL::rt_cli(); + + HAL::rt_sti(); + } +} // namespace NewOS -- cgit v1.2.3