1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:27:36 +00:00

Kernel/riscv64: Implement enter_thread_context

This code is based on the aarch64 implementation.
This commit is contained in:
Sönke Holz 2024-02-15 16:37:00 +01:00 committed by Andrew Kaster
parent 2f33e7a964
commit 7fbcceb657
2 changed files with 34 additions and 1 deletions

View file

@ -93,6 +93,11 @@ struct [[gnu::packed]] alignas(u64) SATP {
{
return bit_cast<SATP>(CSR::read(CSR::Address::SATP));
}
bool operator==(SATP const& other) const
{
return bit_cast<u64>(*this) == bit_cast<u64>(other);
}
};
static_assert(AssertSize<SATP, 8>());