Enum swap::userfaultfd::UffdEvent
pub enum UffdEvent {
Pagefault {
kind: FaultKind,
rw: ReadWrite,
addr: *mut c_void,
},
Fork {
uffd: Uffd,
},
Remap {
from: *mut c_void,
to: *mut c_void,
len: usize,
},
Remove {
start: *mut c_void,
end: *mut c_void,
},
Unmap {
start: *mut c_void,
end: *mut c_void,
},
}
Expand description
Events from the userfaultfd object that are read by Uffd::read_event()
.
Variants§
Pagefault
A pagefault event.
Fork
Generated when the faulting process invokes fork(2)
(or clone(2)
without the CLONE_VM
flag).
Fields
§
uffd: Uffd
The Uffd
object created for the child by fork(2)
Remap
Generated when the faulting process invokes mremap(2)
.
Fields
Remove
Generated when the faulting process invokes madvise(2)
with MADV_DONTNEED
or
MADV_REMOVE
advice.
Fields
Unmap
Generated when the faulting process unmaps a meomry range, either explicitly using
munmap(2)
or implicitly during mmap(2)
or mremap(2)
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl !Send for Event
impl !Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more