From 13dd2bd5a88ec7efeadf8586778f2c5a26d8cd9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 27 Apr 2025 14:07:33 +0000 Subject: Move not public methods into anonymous namespace --- .../interrupt_descriptor_table/segment_selector.hpp | 7 +++++++ arch/x86_64/include/arch/context_switching/main.hpp | 2 -- arch/x86_64/include/arch/context_switching/syscall_handler.hpp | 9 --------- 3 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 arch/x86_64/include/arch/context_switching/syscall_handler.hpp (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp index e8854f9..7bfb563 100644 --- a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/segment_selector.hpp @@ -82,6 +82,13 @@ namespace teachos::arch::context_switching::interrupt_descriptor_table */ auto operator|=(std::bitset<3U> other) -> void; + /** + * @brief Combines all bits in the underlying data in the correct order to return a raw value containing all bits. + * + * @return Underlying value combined into it's full size. + */ + operator uint16_t() const { return static_cast(_flags) | (static_cast(_index) << 3U); } + private: uint8_t _flags : 3 = {}; ///< Underlying bits used to read the flags from. uint16_t _index : 13 = diff --git a/arch/x86_64/include/arch/context_switching/main.hpp b/arch/x86_64/include/arch/context_switching/main.hpp index 5537174..f8477ea 100644 --- a/arch/x86_64/include/arch/context_switching/main.hpp +++ b/arch/x86_64/include/arch/context_switching/main.hpp @@ -46,8 +46,6 @@ namespace teachos::arch::context_switching auto switch_context(interrupt_descriptor_table::segment_selector data_segment, interrupt_descriptor_table::segment_selector code_segment, void (*return_function)()) -> void; - auto setup_syscall() -> void; - } // namespace teachos::arch::context_switching #endif // TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_MAIN_HPP diff --git a/arch/x86_64/include/arch/context_switching/syscall_handler.hpp b/arch/x86_64/include/arch/context_switching/syscall_handler.hpp deleted file mode 100644 index 5a46924..0000000 --- a/arch/x86_64/include/arch/context_switching/syscall_handler.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SYSCALL_HANDLER_HPP -#define TEACHOS_ARCH_X86_64_CONTEXT_SWITCHING_SYSCALL_HANDLER_HPP - -namespace teachos::arch::context_switching -{ - [[gnu::naked]] - auto syscall_handler() -> void; -} -#endif \ No newline at end of file -- cgit v1.2.3