diff options
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/mm/types.rs')
-rw-r--r-- | vendor/rustix/src/backend/linux_raw/mm/types.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/mm/types.rs b/vendor/rustix/src/backend/linux_raw/mm/types.rs index a34c41f4f..576f08a3d 100644 --- a/vendor/rustix/src/backend/linux_raw/mm/types.rs +++ b/vendor/rustix/src/backend/linux_raw/mm/types.rs @@ -1,4 +1,4 @@ -use super::super::c; +use crate::backend::c; use bitflags::bitflags; bitflags! { @@ -7,6 +7,8 @@ bitflags! { /// For `PROT_NONE`, use `ProtFlags::empty()`. /// /// [`mmap`]: crate::io::mmap + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct ProtFlags: u32 { /// `PROT_READ` const READ = linux_raw_sys::general::PROT_READ; @@ -23,6 +25,8 @@ bitflags! { /// For `PROT_NONE`, use `MprotectFlags::empty()`. /// /// [`mprotect`]: crate::io::mprotect + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct MprotectFlags: u32 { /// `PROT_READ` const READ = linux_raw_sys::general::PROT_READ; @@ -44,6 +48,8 @@ bitflags! { /// /// [`mmap`]: crate::io::mmap /// [`mmap_anonymous`]: crates::io::mmap_anonymous + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct MapFlags: u32 { /// `MAP_SHARED` const SHARED = linux_raw_sys::general::MAP_SHARED; @@ -89,6 +95,8 @@ bitflags! { /// /// [`mremap`]: crate::io::mremap /// [`mremap_fixed`]: crate::io::mremap_fixed + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct MremapFlags: u32 { /// `MREMAP_MAYMOVE` const MAYMOVE = linux_raw_sys::general::MREMAP_MAYMOVE; @@ -101,6 +109,8 @@ bitflags! { /// `MLOCK_*` flags for use with [`mlock_with`]. /// /// [`mlock_with`]: crate::io::mlock_with + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct MlockFlags: u32 { /// `MLOCK_ONFAULT` const ONFAULT = linux_raw_sys::general::MLOCK_ONFAULT; @@ -111,6 +121,8 @@ bitflags! { /// `MS_*` flags for use with [`msync`]. /// /// [`msync`]: crate::io::msync + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct MsyncFlags: u32 { /// `MS_SYNC`—Requests an update and waits for it to complete. const SYNC = linux_raw_sys::general::MS_SYNC; @@ -128,6 +140,8 @@ bitflags! { /// `O_*` flags for use with [`userfaultfd`]. /// /// [`userfaultfd`]: crate::io::userfaultfd + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct UserfaultfdFlags: c::c_uint { /// `O_CLOEXEC` const CLOEXEC = linux_raw_sys::general::O_CLOEXEC; @@ -195,6 +209,8 @@ pub enum Advice { LinuxPopulateRead = linux_raw_sys::general::MADV_POPULATE_READ, /// `MADV_POPULATE_WRITE` (since Linux 5.14) LinuxPopulateWrite = linux_raw_sys::general::MADV_POPULATE_WRITE, + /// `MADV_DONTNEED_LOCKED` (since Linux 5.18) + LinuxDontneedLocked = linux_raw_sys::general::MADV_DONTNEED_LOCKED, } #[allow(non_upper_case_globals)] |