mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
Kernel: Stop truncating PageTableEntry::raw(), and make set_bit private
set_bit() in both PageDirectory and PageTableEntry are now private, and remove a useless cast from PageTableEntry::raw().
This commit is contained in:
parent
e824bead54
commit
5920b84696
1 changed files with 3 additions and 3 deletions
|
@ -63,6 +63,7 @@ public:
|
||||||
bool is_execute_disabled() const { return (raw() & NoExecute) == NoExecute; }
|
bool is_execute_disabled() const { return (raw() & NoExecute) == NoExecute; }
|
||||||
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
|
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
|
||||||
|
|
||||||
|
private:
|
||||||
void set_bit(u64 bit, bool value)
|
void set_bit(u64 bit, bool value)
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
|
@ -71,7 +72,6 @@ public:
|
||||||
m_raw &= ~bit;
|
m_raw &= ~bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
u64 m_raw;
|
u64 m_raw;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public:
|
||||||
m_raw |= PhysicalAddress::physical_page_base(value);
|
m_raw |= PhysicalAddress::physical_page_base(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 raw() const { return (u32)m_raw; }
|
u64 raw() const { return m_raw; }
|
||||||
|
|
||||||
enum Flags {
|
enum Flags {
|
||||||
Present = 1 << 0,
|
Present = 1 << 0,
|
||||||
|
@ -120,6 +120,7 @@ public:
|
||||||
bool is_null() const { return m_raw == 0; }
|
bool is_null() const { return m_raw == 0; }
|
||||||
void clear() { m_raw = 0; }
|
void clear() { m_raw = 0; }
|
||||||
|
|
||||||
|
private:
|
||||||
void set_bit(u64 bit, bool value)
|
void set_bit(u64 bit, bool value)
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
|
@ -128,7 +129,6 @@ public:
|
||||||
m_raw &= ~bit;
|
m_raw &= ~bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
u64 m_raw;
|
u64 m_raw;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue