aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-03 20:45:30 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-03 20:45:30 +0100
commitfc26187d9ace9798d9494341f3513eb0840b006d (patch)
tree6874a6c869376e8c3768fc2594f438a56e3d1136 /arch/x86_64/include
parentf3dd2b2f5bd1b5dd4d4309a30db3c7733b8f63bb (diff)
downloadteachos-fc26187d9ace9798d9494341f3513eb0840b006d.tar.xz
teachos-fc26187d9ace9798d9494341f3513eb0840b006d.zip
x86_64/memory: make scoped_mapping swappable
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/memory/scoped_mapping.hpp4
1 files changed, 4 insertions, 0 deletions
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