summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalHart.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-13 19:38:29 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-13 19:38:29 +0200
commit7327f305efb1c6678722308cc5f9645dd39f451e (patch)
tree0e15f4ad6f275aa689f5d66641d3d9ad59d15472 /Kernel/HALKit/AMD64/HalHart.cpp
parent349fe48baf941b2d1b571d3a5d0d796823bae312 (diff)
MHR-31: Lots of fixes and improvements regarding the kernel.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalHart.cpp')
-rw-r--r--Kernel/HALKit/AMD64/HalHart.cpp30
1 files changed, 30 insertions, 0 deletions
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 <ArchKit/ArchKit.hpp>
+
+// 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