aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
Diffstat (limited to 'kapi')
-rw-r--r--kapi/include/kapi/boot.hpp2
-rw-r--r--kapi/include/kapi/memory/page.hpp9
2 files changed, 10 insertions, 1 deletions
diff --git a/kapi/include/kapi/boot.hpp b/kapi/include/kapi/boot.hpp
index 9c344cf..dd99198 100644
--- a/kapi/include/kapi/boot.hpp
+++ b/kapi/include/kapi/boot.hpp
@@ -11,7 +11,7 @@ namespace teachos::boot
//! @qualifier platform-defined
//! An object passed from the early pre-main stage to the kernel executable.
- extern "C" information const bootstrap_information;
+ extern "C" information bootstrap_information;
} // namespace teachos::boot
#endif
diff --git a/kapi/include/kapi/memory/page.hpp b/kapi/include/kapi/memory/page.hpp
index 66e8482..0b7083a 100644
--- a/kapi/include/kapi/memory/page.hpp
+++ b/kapi/include/kapi/memory/page.hpp
@@ -51,6 +51,15 @@ namespace teachos::memory
return m_number;
}
+ //! Get a handle n pages after the one referenced by this handle.
+ //!
+ //! @param n The positive offset to this page.
+ //! @return A handle referencing the page n pages after the one referenced by this handle.
+ constexpr auto operator+(std::size_t n) const noexcept -> page
+ {
+ return page{m_number + n};
+ }
+
//! Check if this page handle reference the same frame as another one.
//!
//! @param other Another page handle.