pub fn register_with_mode(
        &self,
        start: *mut c_void,
        len: usize,
        mode: RegisterMode,
    ) -> Result<IoctlFlags> {
        let mut register = raw::uffdio_register {
            range: raw::uffdio_range {
                start: start as u64,
                len: len as u64,
            },
            mode: mode.bits(),
            ioctls: 0,
        };
        unsafe {
            raw::register(self.as_raw_fd(), &mut register as *mut raw::uffdio_register)?;
        }
        IoctlFlags::from_bits(register.ioctls).ok_or(Error::UnrecognizedIoctls(register.ioctls))
    }
/// Register a memory address range with the userfaultfd object for the given mode and
/// returns the `IoctlFlags` that are available for the selected range.
Register a memory address range with the userfaultfd object for the given mode and
returns the `IoctlFlags` that are available for the selected range.
Register a memory address range with the userfaultfd object for the given mode and returns the ` IoctlFlags ` that are available for the selected range .
pub fn register_with_mode(
        &self,
        start: *mut c_void,
        len: usize,
        mode: RegisterMode,
    ) -> Result<IoctlFlags> {
        let mut register = raw::uffdio_register {
            range: raw::uffdio_range {
                start: start as u64,
                len: len as u64,
            },
            mode: mode.bits(),
            ioctls: 0,
        };
        unsafe {
            raw::register(self.as_raw_fd(), &mut register as *mut raw::uffdio_register)?;
        }
        IoctlFlags::from_bits(register.ioctls).ok_or(Error::UnrecognizedIoctls(register.ioctls))
    }
pub fn register_with_mode ( & self , start : * mut c_void , len : usize , mode : RegisterMode , ) -> Result < IoctlFlags > { let mut register = raw :: uffdio_register { range : raw :: uffdio_range { start : start as u64 , len : len as u64 , } , mode : mode . bits ( ) , ioctls : 0 , } ; unsafe { raw :: register ( self . as_raw_fd ( ) , & mut register as * mut raw :: uffdio_register ) ? ; } IoctlFlags :: from_bits ( register . ioctls ) . ok_or ( Error :: UnrecognizedIoctls ( register . ioctls ) ) }
Register a memory address range with the userfaultfd object for the given mode and
returns the `IoctlFlags` that are available for the selected range.
Register a memory address range with the userfaultfd object for the given mode and returns the ` IoctlFlags ` that are available for the selected range .
&self
start
*mut c_void
len
usize
mode
RegisterMode