summaryrefslogtreecommitdiff
path: root/Kernel/i386.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-05 10:29:19 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-05 10:29:19 +0100
commite85c22fe58a39aa930251ad5e14c7dd6979a163f (patch)
treeae12d736b363c61a3d449a4aa7765320a704f0b8 /Kernel/i386.h
parent72cdc62155be8af67ff9328bc4226a69bbbb659c (diff)
downloadserenity-e85c22fe58a39aa930251ad5e14c7dd6979a163f.zip
Tidy up the page fault code a bit in preparation.
Diffstat (limited to 'Kernel/i386.h')
-rw-r--r--Kernel/i386.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Kernel/i386.h b/Kernel/i386.h
index e03c4a71b9..c17c61bfa2 100644
--- a/Kernel/i386.h
+++ b/Kernel/i386.h
@@ -126,26 +126,26 @@ enum Flags {
class PageFault {
public:
- PageFault(word code, LinearAddress address)
+ PageFault(word code, LinearAddress laddr)
: m_code(code)
- , m_address(address)
+ , m_laddr(laddr)
{
}
- LinearAddress address() const { return m_address; }
+ LinearAddress laddr() const { return m_laddr; }
word code() const { return m_code; }
- bool isNotPresent() const { return (m_code & 1) == PageFaultFlags::NotPresent; }
- bool isProtectionViolation() const { return (m_code & 1) == PageFaultFlags::ProtectionViolation; }
- bool isRead() const { return (m_code & 2) == PageFaultFlags::Read; }
- bool isWrite() const { return (m_code & 2) == PageFaultFlags::Write; }
- bool isUser() const { return (m_code & 4) == PageFaultFlags::UserMode; }
- bool isSupervisor() const { return (m_code & 4) == PageFaultFlags::SupervisorMode; }
- bool isInstructionFetch() const { return (m_code & 8) == PageFaultFlags::InstructionFetch; }
+ bool is_not_present() const { return (m_code & 1) == PageFaultFlags::NotPresent; }
+ bool is_protection_violation() const { return (m_code & 1) == PageFaultFlags::ProtectionViolation; }
+ bool is_read() const { return (m_code & 2) == PageFaultFlags::Read; }
+ bool is_write() const { return (m_code & 2) == PageFaultFlags::Write; }
+ bool is_user() const { return (m_code & 4) == PageFaultFlags::UserMode; }
+ bool is_supervisor() const { return (m_code & 4) == PageFaultFlags::SupervisorMode; }
+ bool is_instruction_fetch() const { return (m_code & 8) == PageFaultFlags::InstructionFetch; }
private:
word m_code;
- LinearAddress m_address;
+ LinearAddress m_laddr;
};
struct RegisterDump {