diff options
Diffstat (limited to 'Kernel/HALKit/AMD64/HalHart.cpp')
| -rw-r--r-- | Kernel/HALKit/AMD64/HalHart.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Kernel/HALKit/AMD64/HalHart.cpp b/Kernel/HALKit/AMD64/HalHart.cpp new file mode 100644 index 00000000..069f3767 --- /dev/null +++ b/Kernel/HALKit/AMD64/HalHart.cpp @@ -0,0 +1,34 @@ +/* ------------------------------------------- + + 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(); + + rt_do_context_switch(stack); + + HAL::rt_sti(); + } + + /// @brief makes the thread sleep on a loop. + /// hooks and hangs thread to prevent code from executing. + void rt_hang_thread(HAL::StackFrame* stack) + { + while (true) + { + /* nohing, code is spinning */ + } + + } +} // namespace NewOS |
