From fc26187d9ace9798d9494341f3513eb0840b006d Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 3 Dec 2025 20:45:30 +0100 Subject: x86_64/memory: make scoped_mapping swappable --- arch/x86_64/include/x86_64/memory/scoped_mapping.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp b/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp index 99585bc..d4844fb 100644 --- a/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp +++ b/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp @@ -53,6 +53,8 @@ namespace teachos::memory::x86_64 //! @note If no frame was ever mapped, this function will panic. auto unmap() -> void; + auto swap(scoped_mapping & other) -> void; + private: page m_page; frame_allocator * m_allocator; @@ -60,6 +62,8 @@ namespace teachos::memory::x86_64 std::uint8_t m_allocated; }; + auto swap(scoped_mapping & lhs, scoped_mapping & rhs) -> void; + } // namespace teachos::memory::x86_64 #endif \ No newline at end of file -- cgit v1.2.3