From e7b04ef7f5da8e014e8b85fcf65448b317cca8ff Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 29 Oct 2025 11:15:50 +0100 Subject: kapi: move halt to cpu namespace --- arch/x86_64/CMakeLists.txt | 2 +- arch/x86_64/src/kapi/cpu.cpp | 12 ++++++++++++ arch/x86_64/src/kapi/system.cpp | 12 ------------ 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 arch/x86_64/src/kapi/cpu.cpp delete mode 100644 arch/x86_64/src/kapi/system.cpp (limited to 'arch/x86_64') diff --git a/arch/x86_64/CMakeLists.txt b/arch/x86_64/CMakeLists.txt index 9be7b04..a681347 100644 --- a/arch/x86_64/CMakeLists.txt +++ b/arch/x86_64/CMakeLists.txt @@ -22,8 +22,8 @@ target_sources("x86_64" PRIVATE # api::kapi implementation "src/kapi/cio.cpp" + "src/kapi/cpu.cpp" "src/kapi/memory.cpp" - "src/kapi/system.cpp" # Memory management "src/memory/mmu.cpp" 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 diff --git a/arch/x86_64/src/kapi/system.cpp b/arch/x86_64/src/kapi/system.cpp deleted file mode 100644 index 2d4c3fe..0000000 --- a/arch/x86_64/src/kapi/system.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "kapi/system.hpp" - -namespace teachos::system -{ - - auto halt() -> void - { - asm volatile("1: hlt\njmp 1b"); - __builtin_unreachable(); - } - -} // namespace teachos::system -- cgit v1.2.3