1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:57:44 +00:00

x86: Simplify region unmapping a bit

Add PageTableEntry::clear() to zero out a whole PTE, and use that for
unmapping instead of clearing individual fields.
This commit is contained in:
Andreas Kling 2020-02-08 12:49:00 +01:00
parent 3b95d61b22
commit a9d7902bb7
3 changed files with 5 additions and 8 deletions

View file

@ -215,6 +215,8 @@ public:
bool is_execute_disabled() const { return raw() & NoExecute; }
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
void clear() { m_raw = 0; }
void set_bit(u64 bit, bool value)
{
if (value)