aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-11 17:46:02 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-11 17:46:02 +0100
commit998a001fc621ca0e7560ca09a8acd29469ae3373 (patch)
tree435a9042ea4a1185c360e8eb92a6d2f082ed3224 /arch/x86_64/src
parenteafbf588760c289b7f54a4771b39af0ccfe8cf59 (diff)
downloadteachos-998a001fc621ca0e7560ca09a8acd29469ae3373.tar.xz
teachos-998a001fc621ca0e7560ca09a8acd29469ae3373.zip
docs: improve documentation
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/memory/page_table.cpp18
-rw-r--r--arch/x86_64/src/memory/region_allocator.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86_64/src/memory/page_table.cpp b/arch/x86_64/src/memory/page_table.cpp
index e797b22..0e404e5 100644
--- a/arch/x86_64/src/memory/page_table.cpp
+++ b/arch/x86_64/src/memory/page_table.cpp
@@ -6,39 +6,39 @@
namespace teachos::memory::x86_64
{
- auto page_table::entry::clear() -> void
+ auto page_table::entry::clear() noexcept -> void
{
m_raw = 0;
}
- auto page_table::entry::present() const -> bool
+ auto page_table::entry::present() const noexcept -> bool
{
return (all_flags() & flags::present) != flags::empty;
}
- auto page_table::entry::huge() const -> bool
+ auto page_table::entry::huge() const noexcept -> bool
{
return (all_flags() & flags::huge_page) != flags::empty;
}
- auto page_table::entry::all_flags() const -> flags
+ auto page_table::entry::all_flags() const noexcept -> flags
{
return std::bit_cast<flags>(m_raw & ~frame_number_mask);
}
- auto page_table::entry::all_flags(flags flags) -> void
+ auto page_table::entry::all_flags(flags flags) noexcept -> void
{
m_raw = (m_raw & ~frame_number_mask) | std::to_underlying(flags);
}
- auto page_table::entry::operator|=(flags rhs) -> page_table::entry &
+ auto page_table::entry::operator|=(flags rhs) noexcept -> page_table::entry &
{
auto raw_flags = std::to_underlying(rhs) & ~frame_number_mask;
m_raw |= raw_flags;
return *this;
}
- auto page_table::entry::frame() const -> std::optional<struct frame>
+ auto page_table::entry::frame() const noexcept -> std::optional<struct frame>
{
if (present())
{
@@ -47,7 +47,7 @@ namespace teachos::memory::x86_64
return std::nullopt;
}
- auto page_table::entry::frame(struct frame frame, flags flags) -> void
+ auto page_table::entry::frame(struct frame frame, flags flags) noexcept -> void
{
m_raw = (frame.start_address().raw() | static_cast<std::uint64_t>(flags));
};
@@ -62,7 +62,7 @@ namespace teachos::memory::x86_64
return m_entries.at(index);
}
- auto page_table::clear() -> void
+ auto page_table::clear() noexcept -> void
{
std::ranges::for_each(m_entries, &page_table::entry::clear);
}
diff --git a/arch/x86_64/src/memory/region_allocator.cpp b/arch/x86_64/src/memory/region_allocator.cpp
index 8ea76c6..e477ec0 100644
--- a/arch/x86_64/src/memory/region_allocator.cpp
+++ b/arch/x86_64/src/memory/region_allocator.cpp
@@ -56,7 +56,7 @@ namespace teachos::memory::x86_64
}
}
- auto region_allocator::allocate() -> std::optional<frame>
+ auto region_allocator::allocate() noexcept -> std::optional<frame>
{
if (!m_current_region)
{