pub const _UFFDIO_REGISTER: u64 = 0;
pub const _UFFDIO_UNREGISTER: u64 = 1;
pub const _UFFDIO_WAKE: u64 = 2;
pub const _UFFDIO_COPY: u64 = 3;
pub const _UFFDIO_ZEROPAGE: u64 = 4;
pub const _UFFDIO_API: u64 = 63;
pub const UFFDIO: u8 = 170;
pub const UFFD_EVENT_PAGEFAULT: u8 = 18;
pub const UFFD_EVENT_FORK: u8 = 19;
pub const UFFD_EVENT_REMAP: u8 = 20;
pub const UFFD_EVENT_REMOVE: u8 = 21;
pub const UFFD_EVENT_UNMAP: u8 = 22;
pub const UFFD_PAGEFAULT_FLAG_WRITE: u64 = 1;
pub const UFFD_PAGEFAULT_FLAG_WP: u64 = 2;
pub const UFFD_FEATURE_PAGEFAULT_FLAG_WP: u64 = 1;
pub const UFFD_FEATURE_EVENT_FORK: u64 = 2;
pub const UFFD_FEATURE_EVENT_REMAP: u64 = 4;
pub const UFFD_FEATURE_EVENT_REMOVE: u64 = 8;
pub const UFFD_FEATURE_MISSING_HUGETLBFS: u64 = 16;
pub const UFFD_FEATURE_MISSING_SHMEM: u64 = 32;
pub const UFFD_FEATURE_EVENT_UNMAP: u64 = 64;
pub const UFFD_FEATURE_SIGBUS: u64 = 128;
pub const UFFD_FEATURE_THREAD_ID: u64 = 256;
pub type __s8 = ::std::os::raw::c_schar;
pub type __u8 = ::std::os::raw::c_uchar;
pub type __s16 = ::std::os::raw::c_short;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __s32 = ::std::os::raw::c_int;
pub type __u32 = ::std::os::raw::c_uint;
pub type __s64 = ::std::os::raw::c_longlong;
pub type __u64 = ::std::os::raw::c_ulonglong;
pub type __poll_t = ::std::os::raw::c_uint;
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct uffd_msg {
pub event: __u8,
pub reserved1: __u8,
pub reserved2: __u16,
pub reserved3: __u32,
pub arg: uffd_msg__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uffd_msg__bindgen_ty_1 {
pub pagefault: uffd_msg__bindgen_ty_1__bindgen_ty_1,
pub fork: uffd_msg__bindgen_ty_1__bindgen_ty_2,
pub remap: uffd_msg__bindgen_ty_1__bindgen_ty_3,
pub remove: uffd_msg__bindgen_ty_1__bindgen_ty_4,
pub reserved: uffd_msg__bindgen_ty_1__bindgen_ty_5,
_bindgen_union_align: [u64; 3usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_1 {
pub flags: __u64,
pub address: __u64,
pub feat: uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub ptid: __u32,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).ptid
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ptid)
)
);
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_1>(),
24usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_1>())).flags as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_1>())).address as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(address)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_1>())).feat as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(feat)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_2 {
pub ufd: __u32,
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_2>())).ufd as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(ufd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_3 {
pub from: __u64,
pub to: __u64,
pub len: __u64,
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_3>(),
24usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_3>())).from as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(from)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_3>())).to as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(to)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_3>())).len as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_4 {
pub start: __u64,
pub end: __u64,
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_4() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_4>(),
16usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_4>(),
8usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_4>())).start as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_4>())).end as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(end)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_5 {
pub reserved1: __u64,
pub reserved2: __u64,
pub reserved3: __u64,
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_5() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1__bindgen_ty_5>(),
24usize,
concat!(
"Size of: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1__bindgen_ty_5>(),
8usize,
concat!(
"Alignment of ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_5>())).reserved1 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(reserved1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_5>())).reserved2 as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(reserved2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1__bindgen_ty_5>())).reserved3 as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(reserved3)
)
);
}
#[test]
fn bindgen_test_layout_uffd_msg__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uffd_msg__bindgen_ty_1>(),
24usize,
concat!("Size of: ", stringify!(uffd_msg__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uffd_msg__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uffd_msg__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uffd_msg__bindgen_ty_1>())).pagefault as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1),
"::",
stringify!(pagefault)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg__bindgen_ty_1>())).fork as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1),
"::",
stringify!(fork)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg__bindgen_ty_1>())).remap as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1),
"::",
stringify!(remap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg__bindgen_ty_1>())).remove as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1),
"::",
stringify!(remove)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg__bindgen_ty_1>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uffd_msg() {
assert_eq!(
::std::mem::size_of::<uffd_msg>(),
32usize,
concat!("Size of: ", stringify!(uffd_msg))
);
assert_eq!(
::std::mem::align_of::<uffd_msg>(),
1usize,
concat!("Alignment of ", stringify!(uffd_msg))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg>())).event as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg),
"::",
stringify!(event)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg>())).reserved1 as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg),
"::",
stringify!(reserved1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg>())).reserved2 as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg),
"::",
stringify!(reserved2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg>())).reserved3 as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg),
"::",
stringify!(reserved3)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffd_msg>())).arg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uffd_msg),
"::",
stringify!(arg)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_api {
pub api: __u64,
pub features: __u64,
pub ioctls: __u64,
}
#[test]
fn bindgen_test_layout_uffdio_api() {
assert_eq!(
::std::mem::size_of::<uffdio_api>(),
24usize,
concat!("Size of: ", stringify!(uffdio_api))
);
assert_eq!(
::std::mem::align_of::<uffdio_api>(),
8usize,
concat!("Alignment of ", stringify!(uffdio_api))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_api>())).api as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffdio_api),
"::",
stringify!(api)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_api>())).features as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uffdio_api),
"::",
stringify!(features)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_api>())).ioctls as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uffdio_api),
"::",
stringify!(ioctls)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_range {
pub start: __u64,
pub len: __u64,
}
#[test]
fn bindgen_test_layout_uffdio_range() {
assert_eq!(
::std::mem::size_of::<uffdio_range>(),
16usize,
concat!("Size of: ", stringify!(uffdio_range))
);
assert_eq!(
::std::mem::align_of::<uffdio_range>(),
8usize,
concat!("Alignment of ", stringify!(uffdio_range))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_range>())).start as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffdio_range),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_range>())).len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uffdio_range),
"::",
stringify!(len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_register {
pub range: uffdio_range,
pub mode: __u64,
pub ioctls: __u64,
}
#[test]
fn bindgen_test_layout_uffdio_register() {
assert_eq!(
::std::mem::size_of::<uffdio_register>(),
32usize,
concat!("Size of: ", stringify!(uffdio_register))
);
assert_eq!(
::std::mem::align_of::<uffdio_register>(),
8usize,
concat!("Alignment of ", stringify!(uffdio_register))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_register>())).range as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffdio_register),
"::",
stringify!(range)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_register>())).mode as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uffdio_register),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_register>())).ioctls as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uffdio_register),
"::",
stringify!(ioctls)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_copy {
pub dst: __u64,
pub src: __u64,
pub len: __u64,
pub mode: __u64,
pub copy: __s64,
}
#[test]
fn bindgen_test_layout_uffdio_copy() {
assert_eq!(
::std::mem::size_of::<uffdio_copy>(),
40usize,
concat!("Size of: ", stringify!(uffdio_copy))
);
assert_eq!(
::std::mem::align_of::<uffdio_copy>(),
8usize,
concat!("Alignment of ", stringify!(uffdio_copy))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_copy>())).dst as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffdio_copy),
"::",
stringify!(dst)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_copy>())).src as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uffdio_copy),
"::",
stringify!(src)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_copy>())).len as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uffdio_copy),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_copy>())).mode as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uffdio_copy),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_copy>())).copy as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uffdio_copy),
"::",
stringify!(copy)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_zeropage {
pub range: uffdio_range,
pub mode: __u64,
pub zeropage: __s64,
}
#[test]
fn bindgen_test_layout_uffdio_zeropage() {
assert_eq!(
::std::mem::size_of::<uffdio_zeropage>(),
32usize,
concat!("Size of: ", stringify!(uffdio_zeropage))
);
assert_eq!(
::std::mem::align_of::<uffdio_zeropage>(),
8usize,
concat!("Alignment of ", stringify!(uffdio_zeropage))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_zeropage>())).range as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uffdio_zeropage),
"::",
stringify!(range)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_zeropage>())).mode as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uffdio_zeropage),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uffdio_zeropage>())).zeropage as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uffdio_zeropage),
"::",
stringify!(zeropage)
)
);
}