executable

This commit is contained in:
Erin 2023-08-09 20:19:12 +02:00 committed by ondra05
parent 12bde3a875
commit 34a82b55dc

View file

@ -501,6 +501,12 @@ pub mod perm_check {
pub const fn writable(perm: Permission) -> bool { pub const fn writable(perm: Permission) -> bool {
matches!(perm, Permission::Write) matches!(perm, Permission::Write)
} }
/// Page is executable
#[inline(always)]
pub const fn executable(perm: Permission) -> bool {
matches!(perm, Permission::Exec)
}
} }
/// Handle VM traps /// Handle VM traps