diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-10-29 11:15:50 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-10-29 11:15:50 +0100 |
| commit | e7b04ef7f5da8e014e8b85fcf65448b317cca8ff (patch) | |
| tree | 3741aaeb76b254f775c720dbe36471c0b7a90ceb /arch/x86_64/src/kapi/cpu.cpp | |
| parent | 6434de8ff75a9143847ef529bc209790ac4909b3 (diff) | |
| download | teachos-e7b04ef7f5da8e014e8b85fcf65448b317cca8ff.tar.xz teachos-e7b04ef7f5da8e014e8b85fcf65448b317cca8ff.zip | |
kapi: move halt to cpu namespace
Diffstat (limited to 'arch/x86_64/src/kapi/cpu.cpp')
| -rw-r--r-- | arch/x86_64/src/kapi/cpu.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86_64/src/kapi/cpu.cpp b/arch/x86_64/src/kapi/cpu.cpp new file mode 100644 index 0000000..22543ee --- /dev/null +++ b/arch/x86_64/src/kapi/cpu.cpp @@ -0,0 +1,12 @@ +#include "kapi/cpu.hpp" + +namespace teachos::cpu +{ + + auto halt() -> void + { + asm volatile("1: hlt\njmp 1b"); + __builtin_unreachable(); + } + +} // namespace teachos::cpu |
