From 6c66bb6196495f087fe81d6f3a608bad6734840c Mon Sep 17 00:00:00 2001 From: quininer Date: Sat, 21 Sep 2024 11:41:27 +0800 Subject: [PATCH] vendor aarch64 sys.rs --- .github/workflows/ci.yml | 4 +- Cargo.lock | 1 + Cargo.toml | 1 + build.rs | 6 +- io-uring-test/src/tests/fs.rs | 2 + src/sys/mod.rs | 2 +- src/sys/sys.rs | 2991 +-------------------------------- src/sys/sys_aarch64.rs | 2986 ++++++++++++++++++++++++++++++++ src/sys/sys_x86-64.rs | 2986 ++++++++++++++++++++++++++++++++ 9 files changed, 5991 insertions(+), 2988 deletions(-) create mode 100644 src/sys/sys_aarch64.rs create mode 100644 src/sys/sys_x86-64.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc518379..1ddebb19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Bench run: cargo bench --package io-uring-bench - check-x86_64: + check-vendor: runs-on: ubuntu-latest strategy: @@ -44,6 +44,7 @@ jobs: target: - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl + - aarch64-unknown-linux-gnu steps: - uses: actions/checkout@v4 @@ -68,7 +69,6 @@ jobs: - "1.63" target: - i686-unknown-linux-gnu - - aarch64-unknown-linux-gnu steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 4a9e6f85..f08d4ecd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -281,6 +281,7 @@ dependencies = [ "anyhow", "bindgen", "bitflags", + "cfg-if", "libc", "sc", "slab", diff --git a/Cargo.toml b/Cargo.toml index 61b3606f..8e0c49f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ io_safety = [] [dependencies] bitflags = "2" +cfg-if = "1" libc = { version = "0.2.98", default-features = false } sc = { version = "0.2", optional = true } diff --git a/build.rs b/build.rs index 75415b5b..24a7d1cb 100644 --- a/build.rs +++ b/build.rs @@ -26,6 +26,8 @@ fn build() { #[cfg(feature = "overwrite")] let outdir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("src/sys"); + let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); + let mut builder = bindgen::Builder::default(); if let Some(path) = env::var("BUILD_IO_URING_INCLUDE_FILE") @@ -37,6 +39,8 @@ fn build() { builder = builder.header_contents("include-file.h", INCLUDE); } + let target_file = outdir.join(format!("sys_{}.rs", target_arch)); + builder .ctypes_prefix("libc") .prepend_enum_name(false) @@ -47,6 +51,6 @@ fn build() { .allowlist_var("__NR_io_uring.*|IOSQE_.*|IORING_.*|IO_URING_.*|SPLICE_F_FD_IN_FIXED") .generate() .unwrap() - .write_to_file(outdir.join("sys.rs")) + .write_to_file(target_file) .unwrap(); } diff --git a/io-uring-test/src/tests/fs.rs b/io-uring-test/src/tests/fs.rs index 8c668065..da3d2a03 100644 --- a/io-uring-test/src/tests/fs.rs +++ b/io-uring-test/src/tests/fs.rs @@ -744,6 +744,8 @@ pub fn test_file_direct_write_read io::Result { #[cfg(all( not(feature = "bindgen"), - not(target_arch = "x86_64"), + not(any(target_arch = "x86_64", target_arch = "aarch64")), not(io_uring_skip_arch_check) ))] compile_error!( diff --git a/src/sys/sys.rs b/src/sys/sys.rs index d33bc714..663b9442 100644 --- a/src/sys/sys.rs +++ b/src/sys/sys.rs @@ -1,2986 +1,9 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -#[repr(C)] -#[derive(Default)] -pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); -impl __IncompleteArrayField { - #[inline] - pub const fn new() -> Self { - __IncompleteArrayField(::core::marker::PhantomData, []) +cfg_if::cfg_if! { + if #[cfg(target_arch = "x86_64")] { + include!("sys_x86-64.rs"); + } else if #[cfg(target_arch = "aarch64")] { + include!("sys_aarch64.rs"); + } else { + include!("sys_x86-64.rs"); } - #[inline] - pub fn as_ptr(&self) -> *const T { - self as *const _ as *const T - } - #[inline] - pub fn as_mut_ptr(&mut self) -> *mut T { - self as *mut _ as *mut T - } - #[inline] - pub unsafe fn as_slice(&self, len: usize) -> &[T] { - ::core::slice::from_raw_parts(self.as_ptr(), len) - } - #[inline] - pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { - ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) - } -} -impl ::core::fmt::Debug for __IncompleteArrayField { - fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - fmt.write_str("__IncompleteArrayField") - } -} -#[repr(C)] -pub struct __BindgenUnionField(::core::marker::PhantomData); -impl __BindgenUnionField { - #[inline] - pub const fn new() -> Self { - __BindgenUnionField(::core::marker::PhantomData) - } - #[inline] - pub unsafe fn as_ref(&self) -> &T { - ::core::mem::transmute(self) - } - #[inline] - pub unsafe fn as_mut(&mut self) -> &mut T { - ::core::mem::transmute(self) - } -} -impl ::core::default::Default for __BindgenUnionField { - #[inline] - fn default() -> Self { - Self::new() - } -} -impl ::core::clone::Clone for __BindgenUnionField { - #[inline] - fn clone(&self) -> Self { - *self - } -} -impl ::core::marker::Copy for __BindgenUnionField {} -impl ::core::fmt::Debug for __BindgenUnionField { - fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - fmt.write_str("__BindgenUnionField") - } -} -impl ::core::hash::Hash for __BindgenUnionField { - fn hash(&self, _state: &mut H) {} -} -impl ::core::cmp::PartialEq for __BindgenUnionField { - fn eq(&self, _other: &__BindgenUnionField) -> bool { - true - } -} -impl ::core::cmp::Eq for __BindgenUnionField {} -pub const __NR_io_uring_setup: u32 = 425; -pub const __NR_io_uring_enter: u32 = 426; -pub const __NR_io_uring_register: u32 = 427; -pub const IORING_FILE_INDEX_ALLOC: i32 = -1; -pub const IORING_SETUP_IOPOLL: u32 = 1; -pub const IORING_SETUP_SQPOLL: u32 = 2; -pub const IORING_SETUP_SQ_AFF: u32 = 4; -pub const IORING_SETUP_CQSIZE: u32 = 8; -pub const IORING_SETUP_CLAMP: u32 = 16; -pub const IORING_SETUP_ATTACH_WQ: u32 = 32; -pub const IORING_SETUP_R_DISABLED: u32 = 64; -pub const IORING_SETUP_SUBMIT_ALL: u32 = 128; -pub const IORING_SETUP_COOP_TASKRUN: u32 = 256; -pub const IORING_SETUP_TASKRUN_FLAG: u32 = 512; -pub const IORING_SETUP_SQE128: u32 = 1024; -pub const IORING_SETUP_CQE32: u32 = 2048; -pub const IORING_SETUP_SINGLE_ISSUER: u32 = 4096; -pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; -pub const IORING_SETUP_NO_MMAP: u32 = 16384; -pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; -pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; -pub const IORING_URING_CMD_FIXED: u32 = 1; -pub const IORING_URING_CMD_MASK: u32 = 1; -pub const IORING_FSYNC_DATASYNC: u32 = 1; -pub const IORING_TIMEOUT_ABS: u32 = 1; -pub const IORING_TIMEOUT_UPDATE: u32 = 2; -pub const IORING_TIMEOUT_BOOTTIME: u32 = 4; -pub const IORING_TIMEOUT_REALTIME: u32 = 8; -pub const IORING_LINK_TIMEOUT_UPDATE: u32 = 16; -pub const IORING_TIMEOUT_ETIME_SUCCESS: u32 = 32; -pub const IORING_TIMEOUT_MULTISHOT: u32 = 64; -pub const IORING_TIMEOUT_CLOCK_MASK: u32 = 12; -pub const IORING_TIMEOUT_UPDATE_MASK: u32 = 18; -pub const SPLICE_F_FD_IN_FIXED: u32 = 2147483648; -pub const IORING_POLL_ADD_MULTI: u32 = 1; -pub const IORING_POLL_UPDATE_EVENTS: u32 = 2; -pub const IORING_POLL_UPDATE_USER_DATA: u32 = 4; -pub const IORING_POLL_ADD_LEVEL: u32 = 8; -pub const IORING_ASYNC_CANCEL_ALL: u32 = 1; -pub const IORING_ASYNC_CANCEL_FD: u32 = 2; -pub const IORING_ASYNC_CANCEL_ANY: u32 = 4; -pub const IORING_ASYNC_CANCEL_FD_FIXED: u32 = 8; -pub const IORING_ASYNC_CANCEL_USERDATA: u32 = 16; -pub const IORING_ASYNC_CANCEL_OP: u32 = 32; -pub const IORING_RECVSEND_POLL_FIRST: u32 = 1; -pub const IORING_RECV_MULTISHOT: u32 = 2; -pub const IORING_RECVSEND_FIXED_BUF: u32 = 4; -pub const IORING_SEND_ZC_REPORT_USAGE: u32 = 8; -pub const IORING_RECVSEND_BUNDLE: u32 = 16; -pub const IORING_NOTIF_USAGE_ZC_COPIED: u32 = 2147483648; -pub const IORING_ACCEPT_MULTISHOT: u32 = 1; -pub const IORING_ACCEPT_DONTWAIT: u32 = 2; -pub const IORING_ACCEPT_POLL_FIRST: u32 = 4; -pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; -pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; -pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; -pub const IORING_NOP_INJECT_RESULT: u32 = 1; -pub const IORING_CQE_F_BUFFER: u32 = 1; -pub const IORING_CQE_F_MORE: u32 = 2; -pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; -pub const IORING_CQE_F_NOTIF: u32 = 8; -pub const IORING_CQE_BUFFER_SHIFT: u32 = 16; -pub const IORING_OFF_SQ_RING: u32 = 0; -pub const IORING_OFF_CQ_RING: u32 = 134217728; -pub const IORING_OFF_SQES: u32 = 268435456; -pub const IORING_OFF_PBUF_RING: u32 = 2147483648; -pub const IORING_OFF_PBUF_SHIFT: u32 = 16; -pub const IORING_OFF_MMAP_MASK: u32 = 4160749568; -pub const IORING_SQ_NEED_WAKEUP: u32 = 1; -pub const IORING_SQ_CQ_OVERFLOW: u32 = 2; -pub const IORING_SQ_TASKRUN: u32 = 4; -pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1; -pub const IORING_ENTER_GETEVENTS: u32 = 1; -pub const IORING_ENTER_SQ_WAKEUP: u32 = 2; -pub const IORING_ENTER_SQ_WAIT: u32 = 4; -pub const IORING_ENTER_EXT_ARG: u32 = 8; -pub const IORING_ENTER_REGISTERED_RING: u32 = 16; -pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; -pub const IORING_FEAT_NODROP: u32 = 2; -pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; -pub const IORING_FEAT_RW_CUR_POS: u32 = 8; -pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16; -pub const IORING_FEAT_FAST_POLL: u32 = 32; -pub const IORING_FEAT_POLL_32BITS: u32 = 64; -pub const IORING_FEAT_SQPOLL_NONFIXED: u32 = 128; -pub const IORING_FEAT_EXT_ARG: u32 = 256; -pub const IORING_FEAT_NATIVE_WORKERS: u32 = 512; -pub const IORING_FEAT_RSRC_TAGS: u32 = 1024; -pub const IORING_FEAT_CQE_SKIP: u32 = 2048; -pub const IORING_FEAT_LINKED_FILE: u32 = 4096; -pub const IORING_FEAT_REG_REG_RING: u32 = 8192; -pub const IORING_FEAT_RECVSEND_BUNDLE: u32 = 16384; -pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; -pub const IORING_REGISTER_FILES_SKIP: i32 = -2; -pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub type __u8 = libc::c_uchar; -pub type __u16 = libc::c_ushort; -pub type __s32 = libc::c_int; -pub type __u32 = libc::c_uint; -pub type __u64 = libc::c_ulonglong; -pub type __kernel_time64_t = libc::c_longlong; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __kernel_timespec { - pub tv_sec: __kernel_time64_t, - pub tv_nsec: libc::c_longlong, -} -#[test] -fn bindgen_test_layout___kernel_timespec() { - const UNINIT: ::core::mem::MaybeUninit<__kernel_timespec> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<__kernel_timespec>(), - 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) - ); - assert_eq!( - ::core::mem::align_of::<__kernel_timespec>(), - 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct open_how { - pub flags: __u64, - pub mode: __u64, - pub resolve: __u64, -} -#[test] -fn bindgen_test_layout_open_how() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(open_how)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(open_how)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(open_how), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(open_how), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resolve) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(open_how), - "::", - stringify!(resolve) - ) - ); -} -pub type __kernel_rwf_t = libc::c_int; -#[repr(C)] -pub struct io_uring_sqe { - pub opcode: __u8, - pub flags: __u8, - pub ioprio: __u16, - pub fd: __s32, - pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1, - pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2, - pub len: __u32, - pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3, - pub user_data: __u64, - pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4, - pub personality: __u16, - pub __bindgen_anon_5: io_uring_sqe__bindgen_ty_5, - pub __bindgen_anon_6: io_uring_sqe__bindgen_ty_6, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union io_uring_sqe__bindgen_ty_1 { - pub off: __u64, - pub addr2: __u64, - pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_sqe__bindgen_ty_1__bindgen_ty_1 { - pub cmd_op: __u32, - pub __pad1: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cmd_op) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(cmd_op) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__pad1) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_1)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_1), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_1), - "::", - stringify!(addr2) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union io_uring_sqe__bindgen_ty_2 { - pub addr: __u64, - pub splice_off_in: __u64, - pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_sqe__bindgen_ty_2__bindgen_ty_1 { - pub level: __u32, - pub optname: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).optname) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(optname) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_2)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_2)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_2), - "::", - stringify!(addr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).splice_off_in) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_2), - "::", - stringify!(splice_off_in) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union io_uring_sqe__bindgen_ty_3 { - pub rw_flags: __kernel_rwf_t, - pub fsync_flags: __u32, - pub poll_events: __u16, - pub poll32_events: __u32, - pub sync_range_flags: __u32, - pub msg_flags: __u32, - pub timeout_flags: __u32, - pub accept_flags: __u32, - pub cancel_flags: __u32, - pub open_flags: __u32, - pub statx_flags: __u32, - pub fadvise_advice: __u32, - pub splice_flags: __u32, - pub rename_flags: __u32, - pub unlink_flags: __u32, - pub hardlink_flags: __u32, - pub xattr_flags: __u32, - pub msg_ring_flags: __u32, - pub uring_cmd_flags: __u32, - pub waitid_flags: __u32, - pub futex_flags: __u32, - pub install_fd_flags: __u32, - pub nop_flags: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_3)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_3)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).rw_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(rw_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fsync_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(fsync_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).poll_events) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(poll_events) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).poll32_events) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(poll32_events) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sync_range_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(sync_range_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(msg_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).timeout_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(timeout_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).accept_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(accept_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cancel_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(cancel_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).open_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(open_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).statx_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(statx_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fadvise_advice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(fadvise_advice) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).splice_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(splice_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).rename_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(rename_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unlink_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(unlink_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).hardlink_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(hardlink_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).xattr_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(xattr_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).msg_ring_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(msg_ring_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).uring_cmd_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(uring_cmd_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).waitid_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(waitid_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).futex_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(futex_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).install_fd_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(install_fd_flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).nop_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_3), - "::", - stringify!(nop_flags) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union io_uring_sqe__bindgen_ty_4 { - pub buf_index: __u16, - pub buf_group: __u16, -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_4)) - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_4)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).buf_index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_4), - "::", - stringify!(buf_index) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_4), - "::", - stringify!(buf_group) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union io_uring_sqe__bindgen_ty_5 { - pub splice_fd_in: __s32, - pub file_index: __u32, - pub optlen: __u32, - pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_5__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_sqe__bindgen_ty_5__bindgen_ty_1 { - pub addr_len: __u16, - pub __pad3: [__u16; 1usize], -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!( - "Size of: ", - stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr_len) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(addr_len) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(__pad3) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_5)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_5)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).splice_fd_in) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_5), - "::", - stringify!(splice_fd_in) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).file_index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_5), - "::", - stringify!(file_index) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).optlen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_5), - "::", - stringify!(optlen) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -pub struct io_uring_sqe__bindgen_ty_6 { - pub __bindgen_anon_1: __BindgenUnionField, - pub optval: __BindgenUnionField<__u64>, - pub cmd: __BindgenUnionField<[__u8; 0usize]>, - pub bindgen_union_field: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_sqe__bindgen_ty_6__bindgen_ty_1 { - pub addr3: __u64, - pub __pad2: [__u64; 1usize], -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), - "::", - stringify!(addr3) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), - "::", - stringify!(__pad2) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_6)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_6)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).optval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_6), - "::", - stringify!(optval) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe__bindgen_ty_6), - "::", - stringify!(cmd) - ) - ); -} -impl Default for io_uring_sqe__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_io_uring_sqe() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(io_uring_sqe)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_sqe)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(opcode) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ioprio) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(ioprio) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(user_data) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).personality) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sqe), - "::", - stringify!(personality) - ) - ); -} -impl Default for io_uring_sqe { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub const IOSQE_FIXED_FILE_BIT: io_uring_sqe_flags_bit = 0; -pub const IOSQE_IO_DRAIN_BIT: io_uring_sqe_flags_bit = 1; -pub const IOSQE_IO_LINK_BIT: io_uring_sqe_flags_bit = 2; -pub const IOSQE_IO_HARDLINK_BIT: io_uring_sqe_flags_bit = 3; -pub const IOSQE_ASYNC_BIT: io_uring_sqe_flags_bit = 4; -pub const IOSQE_BUFFER_SELECT_BIT: io_uring_sqe_flags_bit = 5; -pub const IOSQE_CQE_SKIP_SUCCESS_BIT: io_uring_sqe_flags_bit = 6; -pub type io_uring_sqe_flags_bit = libc::c_uint; -pub const IORING_OP_NOP: io_uring_op = 0; -pub const IORING_OP_READV: io_uring_op = 1; -pub const IORING_OP_WRITEV: io_uring_op = 2; -pub const IORING_OP_FSYNC: io_uring_op = 3; -pub const IORING_OP_READ_FIXED: io_uring_op = 4; -pub const IORING_OP_WRITE_FIXED: io_uring_op = 5; -pub const IORING_OP_POLL_ADD: io_uring_op = 6; -pub const IORING_OP_POLL_REMOVE: io_uring_op = 7; -pub const IORING_OP_SYNC_FILE_RANGE: io_uring_op = 8; -pub const IORING_OP_SENDMSG: io_uring_op = 9; -pub const IORING_OP_RECVMSG: io_uring_op = 10; -pub const IORING_OP_TIMEOUT: io_uring_op = 11; -pub const IORING_OP_TIMEOUT_REMOVE: io_uring_op = 12; -pub const IORING_OP_ACCEPT: io_uring_op = 13; -pub const IORING_OP_ASYNC_CANCEL: io_uring_op = 14; -pub const IORING_OP_LINK_TIMEOUT: io_uring_op = 15; -pub const IORING_OP_CONNECT: io_uring_op = 16; -pub const IORING_OP_FALLOCATE: io_uring_op = 17; -pub const IORING_OP_OPENAT: io_uring_op = 18; -pub const IORING_OP_CLOSE: io_uring_op = 19; -pub const IORING_OP_FILES_UPDATE: io_uring_op = 20; -pub const IORING_OP_STATX: io_uring_op = 21; -pub const IORING_OP_READ: io_uring_op = 22; -pub const IORING_OP_WRITE: io_uring_op = 23; -pub const IORING_OP_FADVISE: io_uring_op = 24; -pub const IORING_OP_MADVISE: io_uring_op = 25; -pub const IORING_OP_SEND: io_uring_op = 26; -pub const IORING_OP_RECV: io_uring_op = 27; -pub const IORING_OP_OPENAT2: io_uring_op = 28; -pub const IORING_OP_EPOLL_CTL: io_uring_op = 29; -pub const IORING_OP_SPLICE: io_uring_op = 30; -pub const IORING_OP_PROVIDE_BUFFERS: io_uring_op = 31; -pub const IORING_OP_REMOVE_BUFFERS: io_uring_op = 32; -pub const IORING_OP_TEE: io_uring_op = 33; -pub const IORING_OP_SHUTDOWN: io_uring_op = 34; -pub const IORING_OP_RENAMEAT: io_uring_op = 35; -pub const IORING_OP_UNLINKAT: io_uring_op = 36; -pub const IORING_OP_MKDIRAT: io_uring_op = 37; -pub const IORING_OP_SYMLINKAT: io_uring_op = 38; -pub const IORING_OP_LINKAT: io_uring_op = 39; -pub const IORING_OP_MSG_RING: io_uring_op = 40; -pub const IORING_OP_FSETXATTR: io_uring_op = 41; -pub const IORING_OP_SETXATTR: io_uring_op = 42; -pub const IORING_OP_FGETXATTR: io_uring_op = 43; -pub const IORING_OP_GETXATTR: io_uring_op = 44; -pub const IORING_OP_SOCKET: io_uring_op = 45; -pub const IORING_OP_URING_CMD: io_uring_op = 46; -pub const IORING_OP_SEND_ZC: io_uring_op = 47; -pub const IORING_OP_SENDMSG_ZC: io_uring_op = 48; -pub const IORING_OP_READ_MULTISHOT: io_uring_op = 49; -pub const IORING_OP_WAITID: io_uring_op = 50; -pub const IORING_OP_FUTEX_WAIT: io_uring_op = 51; -pub const IORING_OP_FUTEX_WAKE: io_uring_op = 52; -pub const IORING_OP_FUTEX_WAITV: io_uring_op = 53; -pub const IORING_OP_FIXED_FD_INSTALL: io_uring_op = 54; -pub const IORING_OP_FTRUNCATE: io_uring_op = 55; -pub const IORING_OP_LAST: io_uring_op = 56; -pub type io_uring_op = libc::c_uint; -pub const IORING_MSG_DATA: io_uring_msg_ring_flags = 0; -pub const IORING_MSG_SEND_FD: io_uring_msg_ring_flags = 1; -pub type io_uring_msg_ring_flags = libc::c_uint; -#[repr(C)] -#[derive(Debug, Default)] -pub struct io_uring_cqe { - pub user_data: __u64, - pub res: __s32, - pub flags: __u32, - pub big_cqe: __IncompleteArrayField<__u64>, -} -#[test] -fn bindgen_test_layout_io_uring_cqe() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_cqe)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_cqe)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_cqe), - "::", - stringify!(user_data) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_cqe), - "::", - stringify!(res) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_cqe), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).big_cqe) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_cqe), - "::", - stringify!(big_cqe) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_sqring_offsets { - pub head: __u32, - pub tail: __u32, - pub ring_mask: __u32, - pub ring_entries: __u32, - pub flags: __u32, - pub dropped: __u32, - pub array: __u32, - pub resv1: __u32, - pub user_addr: __u64, -} -#[test] -fn bindgen_test_layout_io_sqring_offsets() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(io_sqring_offsets)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_sqring_offsets)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(tail) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(ring_mask) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(ring_entries) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dropped) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(dropped) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(array) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(resv1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(io_sqring_offsets), - "::", - stringify!(user_addr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_cqring_offsets { - pub head: __u32, - pub tail: __u32, - pub ring_mask: __u32, - pub ring_entries: __u32, - pub overflow: __u32, - pub cqes: __u32, - pub flags: __u32, - pub resv1: __u32, - pub user_addr: __u64, -} -#[test] -fn bindgen_test_layout_io_cqring_offsets() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(io_cqring_offsets)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_cqring_offsets)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(tail) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(ring_mask) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(ring_entries) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).overflow) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(overflow) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cqes) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(cqes) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(resv1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(io_cqring_offsets), - "::", - stringify!(user_addr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_params { - pub sq_entries: __u32, - pub cq_entries: __u32, - pub flags: __u32, - pub sq_thread_cpu: __u32, - pub sq_thread_idle: __u32, - pub features: __u32, - pub wq_fd: __u32, - pub resv: [__u32; 3usize], - pub sq_off: io_sqring_offsets, - pub cq_off: io_cqring_offsets, -} -#[test] -fn bindgen_test_layout_io_uring_params() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 120usize, - concat!("Size of: ", stringify!(io_uring_params)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_params)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sq_entries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(sq_entries) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cq_entries) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(cq_entries) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_cpu) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(sq_thread_cpu) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_idle) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(sq_thread_idle) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).features) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(features) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wq_fd) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(wq_fd) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sq_off) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(sq_off) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cq_off) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(io_uring_params), - "::", - stringify!(cq_off) - ) - ); -} -pub const IORING_REGISTER_BUFFERS: io_uring_register_op = 0; -pub const IORING_UNREGISTER_BUFFERS: io_uring_register_op = 1; -pub const IORING_REGISTER_FILES: io_uring_register_op = 2; -pub const IORING_UNREGISTER_FILES: io_uring_register_op = 3; -pub const IORING_REGISTER_EVENTFD: io_uring_register_op = 4; -pub const IORING_UNREGISTER_EVENTFD: io_uring_register_op = 5; -pub const IORING_REGISTER_FILES_UPDATE: io_uring_register_op = 6; -pub const IORING_REGISTER_EVENTFD_ASYNC: io_uring_register_op = 7; -pub const IORING_REGISTER_PROBE: io_uring_register_op = 8; -pub const IORING_REGISTER_PERSONALITY: io_uring_register_op = 9; -pub const IORING_UNREGISTER_PERSONALITY: io_uring_register_op = 10; -pub const IORING_REGISTER_RESTRICTIONS: io_uring_register_op = 11; -pub const IORING_REGISTER_ENABLE_RINGS: io_uring_register_op = 12; -pub const IORING_REGISTER_FILES2: io_uring_register_op = 13; -pub const IORING_REGISTER_FILES_UPDATE2: io_uring_register_op = 14; -pub const IORING_REGISTER_BUFFERS2: io_uring_register_op = 15; -pub const IORING_REGISTER_BUFFERS_UPDATE: io_uring_register_op = 16; -pub const IORING_REGISTER_IOWQ_AFF: io_uring_register_op = 17; -pub const IORING_UNREGISTER_IOWQ_AFF: io_uring_register_op = 18; -pub const IORING_REGISTER_IOWQ_MAX_WORKERS: io_uring_register_op = 19; -pub const IORING_REGISTER_RING_FDS: io_uring_register_op = 20; -pub const IORING_UNREGISTER_RING_FDS: io_uring_register_op = 21; -pub const IORING_REGISTER_PBUF_RING: io_uring_register_op = 22; -pub const IORING_UNREGISTER_PBUF_RING: io_uring_register_op = 23; -pub const IORING_REGISTER_SYNC_CANCEL: io_uring_register_op = 24; -pub const IORING_REGISTER_FILE_ALLOC_RANGE: io_uring_register_op = 25; -pub const IORING_REGISTER_PBUF_STATUS: io_uring_register_op = 26; -pub const IORING_REGISTER_NAPI: io_uring_register_op = 27; -pub const IORING_UNREGISTER_NAPI: io_uring_register_op = 28; -pub const IORING_REGISTER_LAST: io_uring_register_op = 29; -pub const IORING_REGISTER_USE_REGISTERED_RING: io_uring_register_op = 2147483648; -pub type io_uring_register_op = libc::c_uint; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_files_update { - pub offset: __u32, - pub resv: __u32, - pub fds: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_files_update() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_files_update)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_files_update)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_files_update), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_files_update), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_files_update), - "::", - stringify!(fds) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_rsrc_register { - pub nr: __u32, - pub flags: __u32, - pub resv2: __u64, - pub data: __u64, - pub tags: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_rsrc_register() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(io_uring_rsrc_register)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_rsrc_register)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_register), - "::", - stringify!(nr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_register), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_register), - "::", - stringify!(resv2) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_register), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_register), - "::", - stringify!(tags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_rsrc_update { - pub offset: __u32, - pub resv: __u32, - pub data: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_rsrc_update() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_rsrc_update)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_rsrc_update)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_rsrc_update2 { - pub offset: __u32, - pub resv: __u32, - pub data: __u64, - pub tags: __u64, - pub nr: __u32, - pub resv2: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_rsrc_update2() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(io_uring_rsrc_update2)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_rsrc_update2)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(tags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(nr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(io_uring_rsrc_update2), - "::", - stringify!(resv2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_probe_op { - pub op: __u8, - pub resv: __u8, - pub flags: __u16, - pub resv2: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_probe_op() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(io_uring_probe_op)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_probe_op)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe_op), - "::", - stringify!(op) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe_op), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe_op), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe_op), - "::", - stringify!(resv2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default)] -pub struct io_uring_probe { - pub last_op: __u8, - pub ops_len: __u8, - pub resv: __u16, - pub resv2: [__u32; 3usize], - pub ops: __IncompleteArrayField, -} -#[test] -fn bindgen_test_layout_io_uring_probe() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_probe)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_probe)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).last_op) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe), - "::", - stringify!(last_op) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ops_len) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe), - "::", - stringify!(ops_len) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe), - "::", - stringify!(resv2) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ops) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_probe), - "::", - stringify!(ops) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct io_uring_restriction { - pub opcode: __u16, - pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1, - pub resv: __u8, - pub resv2: [__u32; 3usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union io_uring_restriction__bindgen_ty_1 { - pub register_op: __u8, - pub sqe_op: __u8, - pub sqe_flags: __u8, -} -#[test] -fn bindgen_test_layout_io_uring_restriction__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 1usize, - concat!("Size of: ", stringify!(io_uring_restriction__bindgen_ty_1)) - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(io_uring_restriction__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).register_op) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction__bindgen_ty_1), - "::", - stringify!(register_op) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sqe_op) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction__bindgen_ty_1), - "::", - stringify!(sqe_op) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sqe_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction__bindgen_ty_1), - "::", - stringify!(sqe_flags) - ) - ); -} -impl Default for io_uring_restriction__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_io_uring_restriction() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_restriction)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_restriction)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction), - "::", - stringify!(opcode) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction), - "::", - stringify!(resv) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_restriction), - "::", - stringify!(resv2) - ) - ); -} -impl Default for io_uring_restriction { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_buf { - pub addr: __u64, - pub len: __u32, - pub bid: __u16, - pub resv: __u16, -} -#[test] -fn bindgen_test_layout_io_uring_buf() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_buf)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_buf)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf), - "::", - stringify!(addr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf), - "::", - stringify!(bid) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf), - "::", - stringify!(resv) - ) - ); -} -#[repr(C)] -pub struct io_uring_buf_ring { - pub __bindgen_anon_1: io_uring_buf_ring__bindgen_ty_1, -} -#[repr(C)] -pub struct io_uring_buf_ring__bindgen_ty_1 { - pub __bindgen_anon_1: __BindgenUnionField, - pub __bindgen_anon_2: __BindgenUnionField, - pub bindgen_union_field: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1 { - pub resv1: __u64, - pub resv2: __u32, - pub resv3: __u16, - pub tail: __u16, -} -#[test] -fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(resv1) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(resv2) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(resv3) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(tail) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default)] -pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2 { - pub __empty_bufs: io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, - pub bufs: __IncompleteArrayField, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {} -#[test] -fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 0usize, - concat!( - "Size of: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 0usize, - concat!( - "Size of: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).__empty_bufs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(__empty_bufs) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bufs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(bufs) - ) - ); -} -#[test] -fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_buf_ring__bindgen_ty_1)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_buf_ring__bindgen_ty_1)) - ); -} -impl Default for io_uring_buf_ring__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_io_uring_buf_ring() { - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_buf_ring)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_buf_ring)) - ); -} -impl Default for io_uring_buf_ring { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub const IOU_PBUF_RING_MMAP: io_uring_register_pbuf_ring_flags = 1; -pub type io_uring_register_pbuf_ring_flags = libc::c_uint; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_buf_reg { - pub ring_addr: __u64, - pub ring_entries: __u32, - pub bgid: __u16, - pub flags: __u16, - pub resv: [__u64; 3usize], -} -#[test] -fn bindgen_test_layout_io_uring_buf_reg() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(io_uring_buf_reg)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_buf_reg)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_reg), - "::", - stringify!(ring_addr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_reg), - "::", - stringify!(ring_entries) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bgid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_reg), - "::", - stringify!(bgid) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_reg), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_reg), - "::", - stringify!(resv) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_buf_status { - pub buf_group: __u32, - pub head: __u32, - pub resv: [__u32; 8usize], -} -#[test] -fn bindgen_test_layout_io_uring_buf_status() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(io_uring_buf_status)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_buf_status)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_status), - "::", - stringify!(buf_group) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_status), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_buf_status), - "::", - stringify!(resv) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_napi { - pub busy_poll_to: __u32, - pub prefer_busy_poll: __u8, - pub pad: [__u8; 3usize], - pub resv: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_napi() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_napi)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_napi)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).busy_poll_to) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_napi), - "::", - stringify!(busy_poll_to) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).prefer_busy_poll) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_napi), - "::", - stringify!(prefer_busy_poll) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(io_uring_napi), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_napi), - "::", - stringify!(resv) - ) - ); -} -pub const IORING_RESTRICTION_REGISTER_OP: io_uring_register_restriction_op = 0; -pub const IORING_RESTRICTION_SQE_OP: io_uring_register_restriction_op = 1; -pub const IORING_RESTRICTION_SQE_FLAGS_ALLOWED: io_uring_register_restriction_op = 2; -pub const IORING_RESTRICTION_SQE_FLAGS_REQUIRED: io_uring_register_restriction_op = 3; -pub const IORING_RESTRICTION_LAST: io_uring_register_restriction_op = 4; -pub type io_uring_register_restriction_op = libc::c_uint; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_getevents_arg { - pub sigmask: __u64, - pub sigmask_sz: __u32, - pub pad: __u32, - pub ts: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_getevents_arg() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(io_uring_getevents_arg)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_getevents_arg)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sigmask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_getevents_arg), - "::", - stringify!(sigmask) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sigmask_sz) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_getevents_arg), - "::", - stringify!(sigmask_sz) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_getevents_arg), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ts) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_getevents_arg), - "::", - stringify!(ts) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_sync_cancel_reg { - pub addr: __u64, - pub fd: __s32, - pub flags: __u32, - pub timeout: __kernel_timespec, - pub opcode: __u8, - pub pad: [__u8; 7usize], - pub pad2: [__u64; 3usize], -} -#[test] -fn bindgen_test_layout_io_uring_sync_cancel_reg() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(io_uring_sync_cancel_reg)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_sync_cancel_reg)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(addr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(timeout) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(opcode) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(pad) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(io_uring_sync_cancel_reg), - "::", - stringify!(pad2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_file_index_range { - pub off: __u32, - pub len: __u32, - pub resv: __u64, -} -#[test] -fn bindgen_test_layout_io_uring_file_index_range() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_file_index_range)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(io_uring_file_index_range)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_file_index_range), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_file_index_range), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_file_index_range), - "::", - stringify!(resv) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct io_uring_recvmsg_out { - pub namelen: __u32, - pub controllen: __u32, - pub payloadlen: __u32, - pub flags: __u32, -} -#[test] -fn bindgen_test_layout_io_uring_recvmsg_out() { - const UNINIT: ::core::mem::MaybeUninit = - ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(io_uring_recvmsg_out)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(io_uring_recvmsg_out)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).namelen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(io_uring_recvmsg_out), - "::", - stringify!(namelen) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).controllen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(io_uring_recvmsg_out), - "::", - stringify!(controllen) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).payloadlen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(io_uring_recvmsg_out), - "::", - stringify!(payloadlen) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(io_uring_recvmsg_out), - "::", - stringify!(flags) - ) - ); -} -pub const SOCKET_URING_OP_SIOCINQ: io_uring_socket_op = 0; -pub const SOCKET_URING_OP_SIOCOUTQ: io_uring_socket_op = 1; -pub const SOCKET_URING_OP_GETSOCKOPT: io_uring_socket_op = 2; -pub const SOCKET_URING_OP_SETSOCKOPT: io_uring_socket_op = 3; -pub type io_uring_socket_op = libc::c_uint; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct futex_waitv { - pub val: __u64, - pub uaddr: __u64, - pub flags: __u32, - pub __reserved: __u32, -} -#[test] -fn bindgen_test_layout_futex_waitv() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(futex_waitv)) - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(futex_waitv)) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(futex_waitv), - "::", - stringify!(val) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(futex_waitv), - "::", - stringify!(uaddr) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(futex_waitv), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(futex_waitv), - "::", - stringify!(__reserved) - ) - ); } diff --git a/src/sys/sys_aarch64.rs b/src/sys/sys_aarch64.rs new file mode 100644 index 00000000..d33bc714 --- /dev/null +++ b/src/sys/sys_aarch64.rs @@ -0,0 +1,2986 @@ +/* automatically generated by rust-bindgen 0.69.4 */ + +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +#[repr(C)] +pub struct __BindgenUnionField(::core::marker::PhantomData); +impl __BindgenUnionField { + #[inline] + pub const fn new() -> Self { + __BindgenUnionField(::core::marker::PhantomData) + } + #[inline] + pub unsafe fn as_ref(&self) -> &T { + ::core::mem::transmute(self) + } + #[inline] + pub unsafe fn as_mut(&mut self) -> &mut T { + ::core::mem::transmute(self) + } +} +impl ::core::default::Default for __BindgenUnionField { + #[inline] + fn default() -> Self { + Self::new() + } +} +impl ::core::clone::Clone for __BindgenUnionField { + #[inline] + fn clone(&self) -> Self { + *self + } +} +impl ::core::marker::Copy for __BindgenUnionField {} +impl ::core::fmt::Debug for __BindgenUnionField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__BindgenUnionField") + } +} +impl ::core::hash::Hash for __BindgenUnionField { + fn hash(&self, _state: &mut H) {} +} +impl ::core::cmp::PartialEq for __BindgenUnionField { + fn eq(&self, _other: &__BindgenUnionField) -> bool { + true + } +} +impl ::core::cmp::Eq for __BindgenUnionField {} +pub const __NR_io_uring_setup: u32 = 425; +pub const __NR_io_uring_enter: u32 = 426; +pub const __NR_io_uring_register: u32 = 427; +pub const IORING_FILE_INDEX_ALLOC: i32 = -1; +pub const IORING_SETUP_IOPOLL: u32 = 1; +pub const IORING_SETUP_SQPOLL: u32 = 2; +pub const IORING_SETUP_SQ_AFF: u32 = 4; +pub const IORING_SETUP_CQSIZE: u32 = 8; +pub const IORING_SETUP_CLAMP: u32 = 16; +pub const IORING_SETUP_ATTACH_WQ: u32 = 32; +pub const IORING_SETUP_R_DISABLED: u32 = 64; +pub const IORING_SETUP_SUBMIT_ALL: u32 = 128; +pub const IORING_SETUP_COOP_TASKRUN: u32 = 256; +pub const IORING_SETUP_TASKRUN_FLAG: u32 = 512; +pub const IORING_SETUP_SQE128: u32 = 1024; +pub const IORING_SETUP_CQE32: u32 = 2048; +pub const IORING_SETUP_SINGLE_ISSUER: u32 = 4096; +pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; +pub const IORING_SETUP_NO_MMAP: u32 = 16384; +pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; +pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_URING_CMD_FIXED: u32 = 1; +pub const IORING_URING_CMD_MASK: u32 = 1; +pub const IORING_FSYNC_DATASYNC: u32 = 1; +pub const IORING_TIMEOUT_ABS: u32 = 1; +pub const IORING_TIMEOUT_UPDATE: u32 = 2; +pub const IORING_TIMEOUT_BOOTTIME: u32 = 4; +pub const IORING_TIMEOUT_REALTIME: u32 = 8; +pub const IORING_LINK_TIMEOUT_UPDATE: u32 = 16; +pub const IORING_TIMEOUT_ETIME_SUCCESS: u32 = 32; +pub const IORING_TIMEOUT_MULTISHOT: u32 = 64; +pub const IORING_TIMEOUT_CLOCK_MASK: u32 = 12; +pub const IORING_TIMEOUT_UPDATE_MASK: u32 = 18; +pub const SPLICE_F_FD_IN_FIXED: u32 = 2147483648; +pub const IORING_POLL_ADD_MULTI: u32 = 1; +pub const IORING_POLL_UPDATE_EVENTS: u32 = 2; +pub const IORING_POLL_UPDATE_USER_DATA: u32 = 4; +pub const IORING_POLL_ADD_LEVEL: u32 = 8; +pub const IORING_ASYNC_CANCEL_ALL: u32 = 1; +pub const IORING_ASYNC_CANCEL_FD: u32 = 2; +pub const IORING_ASYNC_CANCEL_ANY: u32 = 4; +pub const IORING_ASYNC_CANCEL_FD_FIXED: u32 = 8; +pub const IORING_ASYNC_CANCEL_USERDATA: u32 = 16; +pub const IORING_ASYNC_CANCEL_OP: u32 = 32; +pub const IORING_RECVSEND_POLL_FIRST: u32 = 1; +pub const IORING_RECV_MULTISHOT: u32 = 2; +pub const IORING_RECVSEND_FIXED_BUF: u32 = 4; +pub const IORING_SEND_ZC_REPORT_USAGE: u32 = 8; +pub const IORING_RECVSEND_BUNDLE: u32 = 16; +pub const IORING_NOTIF_USAGE_ZC_COPIED: u32 = 2147483648; +pub const IORING_ACCEPT_MULTISHOT: u32 = 1; +pub const IORING_ACCEPT_DONTWAIT: u32 = 2; +pub const IORING_ACCEPT_POLL_FIRST: u32 = 4; +pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; +pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; +pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; +pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_CQE_F_BUFFER: u32 = 1; +pub const IORING_CQE_F_MORE: u32 = 2; +pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; +pub const IORING_CQE_F_NOTIF: u32 = 8; +pub const IORING_CQE_BUFFER_SHIFT: u32 = 16; +pub const IORING_OFF_SQ_RING: u32 = 0; +pub const IORING_OFF_CQ_RING: u32 = 134217728; +pub const IORING_OFF_SQES: u32 = 268435456; +pub const IORING_OFF_PBUF_RING: u32 = 2147483648; +pub const IORING_OFF_PBUF_SHIFT: u32 = 16; +pub const IORING_OFF_MMAP_MASK: u32 = 4160749568; +pub const IORING_SQ_NEED_WAKEUP: u32 = 1; +pub const IORING_SQ_CQ_OVERFLOW: u32 = 2; +pub const IORING_SQ_TASKRUN: u32 = 4; +pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1; +pub const IORING_ENTER_GETEVENTS: u32 = 1; +pub const IORING_ENTER_SQ_WAKEUP: u32 = 2; +pub const IORING_ENTER_SQ_WAIT: u32 = 4; +pub const IORING_ENTER_EXT_ARG: u32 = 8; +pub const IORING_ENTER_REGISTERED_RING: u32 = 16; +pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; +pub const IORING_FEAT_NODROP: u32 = 2; +pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; +pub const IORING_FEAT_RW_CUR_POS: u32 = 8; +pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16; +pub const IORING_FEAT_FAST_POLL: u32 = 32; +pub const IORING_FEAT_POLL_32BITS: u32 = 64; +pub const IORING_FEAT_SQPOLL_NONFIXED: u32 = 128; +pub const IORING_FEAT_EXT_ARG: u32 = 256; +pub const IORING_FEAT_NATIVE_WORKERS: u32 = 512; +pub const IORING_FEAT_RSRC_TAGS: u32 = 1024; +pub const IORING_FEAT_CQE_SKIP: u32 = 2048; +pub const IORING_FEAT_LINKED_FILE: u32 = 4096; +pub const IORING_FEAT_REG_REG_RING: u32 = 8192; +pub const IORING_FEAT_RECVSEND_BUNDLE: u32 = 16384; +pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; +pub const IORING_REGISTER_FILES_SKIP: i32 = -2; +pub const IO_URING_OP_SUPPORTED: u32 = 1; +pub type __u8 = libc::c_uchar; +pub type __u16 = libc::c_ushort; +pub type __s32 = libc::c_int; +pub type __u32 = libc::c_uint; +pub type __u64 = libc::c_ulonglong; +pub type __kernel_time64_t = libc::c_longlong; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __kernel_timespec { + pub tv_sec: __kernel_time64_t, + pub tv_nsec: libc::c_longlong, +} +#[test] +fn bindgen_test_layout___kernel_timespec() { + const UNINIT: ::core::mem::MaybeUninit<__kernel_timespec> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<__kernel_timespec>(), + 16usize, + concat!("Size of: ", stringify!(__kernel_timespec)) + ); + assert_eq!( + ::core::mem::align_of::<__kernel_timespec>(), + 8usize, + concat!("Alignment of ", stringify!(__kernel_timespec)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_timespec), + "::", + stringify!(tv_sec) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__kernel_timespec), + "::", + stringify!(tv_nsec) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct open_how { + pub flags: __u64, + pub mode: __u64, + pub resolve: __u64, +} +#[test] +fn bindgen_test_layout_open_how() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(open_how)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(open_how)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(mode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resolve) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(resolve) + ) + ); +} +pub type __kernel_rwf_t = libc::c_int; +#[repr(C)] +pub struct io_uring_sqe { + pub opcode: __u8, + pub flags: __u8, + pub ioprio: __u16, + pub fd: __s32, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1, + pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2, + pub len: __u32, + pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3, + pub user_data: __u64, + pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4, + pub personality: __u16, + pub __bindgen_anon_5: io_uring_sqe__bindgen_ty_5, + pub __bindgen_anon_6: io_uring_sqe__bindgen_ty_6, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_1 { + pub off: __u64, + pub addr2: __u64, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_1__bindgen_ty_1 { + pub cmd_op: __u32, + pub __pad1: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cmd_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(cmd_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(__pad1) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1), + "::", + stringify!(off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr2) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1), + "::", + stringify!(addr2) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_2 { + pub addr: __u64, + pub splice_off_in: __u64, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_2__bindgen_ty_1 { + pub level: __u32, + pub optname: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optname) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(optname) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_2)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_2)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_off_in) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2), + "::", + stringify!(splice_off_in) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_3 { + pub rw_flags: __kernel_rwf_t, + pub fsync_flags: __u32, + pub poll_events: __u16, + pub poll32_events: __u32, + pub sync_range_flags: __u32, + pub msg_flags: __u32, + pub timeout_flags: __u32, + pub accept_flags: __u32, + pub cancel_flags: __u32, + pub open_flags: __u32, + pub statx_flags: __u32, + pub fadvise_advice: __u32, + pub splice_flags: __u32, + pub rename_flags: __u32, + pub unlink_flags: __u32, + pub hardlink_flags: __u32, + pub xattr_flags: __u32, + pub msg_ring_flags: __u32, + pub uring_cmd_flags: __u32, + pub waitid_flags: __u32, + pub futex_flags: __u32, + pub install_fd_flags: __u32, + pub nop_flags: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_3() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_3)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_3)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rw_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(rw_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fsync_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(fsync_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).poll_events) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(poll_events) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).poll32_events) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(poll32_events) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sync_range_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(sync_range_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(msg_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).timeout_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(timeout_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).accept_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(accept_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cancel_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(cancel_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).open_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(open_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).statx_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(statx_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fadvise_advice) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(fadvise_advice) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(splice_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rename_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(rename_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).unlink_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(unlink_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).hardlink_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(hardlink_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xattr_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(xattr_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).msg_ring_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(msg_ring_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).uring_cmd_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(uring_cmd_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).waitid_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(waitid_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).futex_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(futex_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).install_fd_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(install_fd_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nop_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(nop_flags) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_3 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_4 { + pub buf_index: __u16, + pub buf_group: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_4() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_4)) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_4)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_4), + "::", + stringify!(buf_index) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_4), + "::", + stringify!(buf_group) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_4 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_5 { + pub splice_fd_in: __s32, + pub file_index: __u32, + pub optlen: __u32, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_5__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_5__bindgen_ty_1 { + pub addr_len: __u16, + pub __pad3: [__u16; 1usize], +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 2usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr_len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), + "::", + stringify!(addr_len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), + "::", + stringify!(__pad3) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_5)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_5)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_fd_in) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(splice_fd_in) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).file_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(file_index) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optlen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(optlen) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +pub struct io_uring_sqe__bindgen_ty_6 { + pub __bindgen_anon_1: __BindgenUnionField, + pub optval: __BindgenUnionField<__u64>, + pub cmd: __BindgenUnionField<[__u8; 0usize]>, + pub bindgen_union_field: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_6__bindgen_ty_1 { + pub addr3: __u64, + pub __pad2: [__u64; 1usize], +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr3) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), + "::", + stringify!(addr3) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), + "::", + stringify!(__pad2) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_6)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_6)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optval) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6), + "::", + stringify!(optval) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6), + "::", + stringify!(cmd) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_6 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_sqe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(io_uring_sqe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ioprio) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(ioprio) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(user_data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).personality) as usize - ptr as usize }, + 42usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(personality) + ) + ); +} +impl Default for io_uring_sqe { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const IOSQE_FIXED_FILE_BIT: io_uring_sqe_flags_bit = 0; +pub const IOSQE_IO_DRAIN_BIT: io_uring_sqe_flags_bit = 1; +pub const IOSQE_IO_LINK_BIT: io_uring_sqe_flags_bit = 2; +pub const IOSQE_IO_HARDLINK_BIT: io_uring_sqe_flags_bit = 3; +pub const IOSQE_ASYNC_BIT: io_uring_sqe_flags_bit = 4; +pub const IOSQE_BUFFER_SELECT_BIT: io_uring_sqe_flags_bit = 5; +pub const IOSQE_CQE_SKIP_SUCCESS_BIT: io_uring_sqe_flags_bit = 6; +pub type io_uring_sqe_flags_bit = libc::c_uint; +pub const IORING_OP_NOP: io_uring_op = 0; +pub const IORING_OP_READV: io_uring_op = 1; +pub const IORING_OP_WRITEV: io_uring_op = 2; +pub const IORING_OP_FSYNC: io_uring_op = 3; +pub const IORING_OP_READ_FIXED: io_uring_op = 4; +pub const IORING_OP_WRITE_FIXED: io_uring_op = 5; +pub const IORING_OP_POLL_ADD: io_uring_op = 6; +pub const IORING_OP_POLL_REMOVE: io_uring_op = 7; +pub const IORING_OP_SYNC_FILE_RANGE: io_uring_op = 8; +pub const IORING_OP_SENDMSG: io_uring_op = 9; +pub const IORING_OP_RECVMSG: io_uring_op = 10; +pub const IORING_OP_TIMEOUT: io_uring_op = 11; +pub const IORING_OP_TIMEOUT_REMOVE: io_uring_op = 12; +pub const IORING_OP_ACCEPT: io_uring_op = 13; +pub const IORING_OP_ASYNC_CANCEL: io_uring_op = 14; +pub const IORING_OP_LINK_TIMEOUT: io_uring_op = 15; +pub const IORING_OP_CONNECT: io_uring_op = 16; +pub const IORING_OP_FALLOCATE: io_uring_op = 17; +pub const IORING_OP_OPENAT: io_uring_op = 18; +pub const IORING_OP_CLOSE: io_uring_op = 19; +pub const IORING_OP_FILES_UPDATE: io_uring_op = 20; +pub const IORING_OP_STATX: io_uring_op = 21; +pub const IORING_OP_READ: io_uring_op = 22; +pub const IORING_OP_WRITE: io_uring_op = 23; +pub const IORING_OP_FADVISE: io_uring_op = 24; +pub const IORING_OP_MADVISE: io_uring_op = 25; +pub const IORING_OP_SEND: io_uring_op = 26; +pub const IORING_OP_RECV: io_uring_op = 27; +pub const IORING_OP_OPENAT2: io_uring_op = 28; +pub const IORING_OP_EPOLL_CTL: io_uring_op = 29; +pub const IORING_OP_SPLICE: io_uring_op = 30; +pub const IORING_OP_PROVIDE_BUFFERS: io_uring_op = 31; +pub const IORING_OP_REMOVE_BUFFERS: io_uring_op = 32; +pub const IORING_OP_TEE: io_uring_op = 33; +pub const IORING_OP_SHUTDOWN: io_uring_op = 34; +pub const IORING_OP_RENAMEAT: io_uring_op = 35; +pub const IORING_OP_UNLINKAT: io_uring_op = 36; +pub const IORING_OP_MKDIRAT: io_uring_op = 37; +pub const IORING_OP_SYMLINKAT: io_uring_op = 38; +pub const IORING_OP_LINKAT: io_uring_op = 39; +pub const IORING_OP_MSG_RING: io_uring_op = 40; +pub const IORING_OP_FSETXATTR: io_uring_op = 41; +pub const IORING_OP_SETXATTR: io_uring_op = 42; +pub const IORING_OP_FGETXATTR: io_uring_op = 43; +pub const IORING_OP_GETXATTR: io_uring_op = 44; +pub const IORING_OP_SOCKET: io_uring_op = 45; +pub const IORING_OP_URING_CMD: io_uring_op = 46; +pub const IORING_OP_SEND_ZC: io_uring_op = 47; +pub const IORING_OP_SENDMSG_ZC: io_uring_op = 48; +pub const IORING_OP_READ_MULTISHOT: io_uring_op = 49; +pub const IORING_OP_WAITID: io_uring_op = 50; +pub const IORING_OP_FUTEX_WAIT: io_uring_op = 51; +pub const IORING_OP_FUTEX_WAKE: io_uring_op = 52; +pub const IORING_OP_FUTEX_WAITV: io_uring_op = 53; +pub const IORING_OP_FIXED_FD_INSTALL: io_uring_op = 54; +pub const IORING_OP_FTRUNCATE: io_uring_op = 55; +pub const IORING_OP_LAST: io_uring_op = 56; +pub type io_uring_op = libc::c_uint; +pub const IORING_MSG_DATA: io_uring_msg_ring_flags = 0; +pub const IORING_MSG_SEND_FD: io_uring_msg_ring_flags = 1; +pub type io_uring_msg_ring_flags = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_cqe { + pub user_data: __u64, + pub res: __s32, + pub flags: __u32, + pub big_cqe: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_io_uring_cqe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_cqe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_cqe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(user_data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(res) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).big_cqe) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(big_cqe) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_sqring_offsets { + pub head: __u32, + pub tail: __u32, + pub ring_mask: __u32, + pub ring_entries: __u32, + pub flags: __u32, + pub dropped: __u32, + pub array: __u32, + pub resv1: __u32, + pub user_addr: __u64, +} +#[test] +fn bindgen_test_layout_io_sqring_offsets() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_sqring_offsets)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_sqring_offsets)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(ring_mask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).dropped) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(dropped) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(user_addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_cqring_offsets { + pub head: __u32, + pub tail: __u32, + pub ring_mask: __u32, + pub ring_entries: __u32, + pub overflow: __u32, + pub cqes: __u32, + pub flags: __u32, + pub resv1: __u32, + pub user_addr: __u64, +} +#[test] +fn bindgen_test_layout_io_cqring_offsets() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_cqring_offsets)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_cqring_offsets)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(ring_mask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).overflow) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(overflow) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cqes) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(cqes) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(user_addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_params { + pub sq_entries: __u32, + pub cq_entries: __u32, + pub flags: __u32, + pub sq_thread_cpu: __u32, + pub sq_thread_idle: __u32, + pub features: __u32, + pub wq_fd: __u32, + pub resv: [__u32; 3usize], + pub sq_off: io_sqring_offsets, + pub cq_off: io_cqring_offsets, +} +#[test] +fn bindgen_test_layout_io_uring_params() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(io_uring_params)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_params)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_entries) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cq_entries) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(cq_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_cpu) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_thread_cpu) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_idle) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_thread_idle) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).features) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(features) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).wq_fd) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(wq_fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_off) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cq_off) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(cq_off) + ) + ); +} +pub const IORING_REGISTER_BUFFERS: io_uring_register_op = 0; +pub const IORING_UNREGISTER_BUFFERS: io_uring_register_op = 1; +pub const IORING_REGISTER_FILES: io_uring_register_op = 2; +pub const IORING_UNREGISTER_FILES: io_uring_register_op = 3; +pub const IORING_REGISTER_EVENTFD: io_uring_register_op = 4; +pub const IORING_UNREGISTER_EVENTFD: io_uring_register_op = 5; +pub const IORING_REGISTER_FILES_UPDATE: io_uring_register_op = 6; +pub const IORING_REGISTER_EVENTFD_ASYNC: io_uring_register_op = 7; +pub const IORING_REGISTER_PROBE: io_uring_register_op = 8; +pub const IORING_REGISTER_PERSONALITY: io_uring_register_op = 9; +pub const IORING_UNREGISTER_PERSONALITY: io_uring_register_op = 10; +pub const IORING_REGISTER_RESTRICTIONS: io_uring_register_op = 11; +pub const IORING_REGISTER_ENABLE_RINGS: io_uring_register_op = 12; +pub const IORING_REGISTER_FILES2: io_uring_register_op = 13; +pub const IORING_REGISTER_FILES_UPDATE2: io_uring_register_op = 14; +pub const IORING_REGISTER_BUFFERS2: io_uring_register_op = 15; +pub const IORING_REGISTER_BUFFERS_UPDATE: io_uring_register_op = 16; +pub const IORING_REGISTER_IOWQ_AFF: io_uring_register_op = 17; +pub const IORING_UNREGISTER_IOWQ_AFF: io_uring_register_op = 18; +pub const IORING_REGISTER_IOWQ_MAX_WORKERS: io_uring_register_op = 19; +pub const IORING_REGISTER_RING_FDS: io_uring_register_op = 20; +pub const IORING_UNREGISTER_RING_FDS: io_uring_register_op = 21; +pub const IORING_REGISTER_PBUF_RING: io_uring_register_op = 22; +pub const IORING_UNREGISTER_PBUF_RING: io_uring_register_op = 23; +pub const IORING_REGISTER_SYNC_CANCEL: io_uring_register_op = 24; +pub const IORING_REGISTER_FILE_ALLOC_RANGE: io_uring_register_op = 25; +pub const IORING_REGISTER_PBUF_STATUS: io_uring_register_op = 26; +pub const IORING_REGISTER_NAPI: io_uring_register_op = 27; +pub const IORING_UNREGISTER_NAPI: io_uring_register_op = 28; +pub const IORING_REGISTER_LAST: io_uring_register_op = 29; +pub const IORING_REGISTER_USE_REGISTERED_RING: io_uring_register_op = 2147483648; +pub type io_uring_register_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_files_update { + pub offset: __u32, + pub resv: __u32, + pub fds: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_files_update() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_files_update)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_files_update)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fds) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(fds) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_register { + pub nr: __u32, + pub flags: __u32, + pub resv2: __u64, + pub data: __u64, + pub tags: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_register() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(io_uring_rsrc_register)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_register)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(tags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_update { + pub offset: __u32, + pub resv: __u32, + pub data: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_update() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_rsrc_update)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_update)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_update2 { + pub offset: __u32, + pub resv: __u32, + pub data: __u64, + pub tags: __u64, + pub nr: __u32, + pub resv2: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_update2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(io_uring_rsrc_update2)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_update2)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(tags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(resv2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_probe_op { + pub op: __u8, + pub resv: __u8, + pub flags: __u16, + pub resv2: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_probe_op() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_probe_op)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_probe_op)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(resv2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_probe { + pub last_op: __u8, + pub ops_len: __u8, + pub resv: __u16, + pub resv2: [__u32; 3usize], + pub ops: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_io_uring_probe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_probe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_probe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).last_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(last_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ops_len) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(ops_len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ops) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(ops) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct io_uring_restriction { + pub opcode: __u16, + pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1, + pub resv: __u8, + pub resv2: [__u32; 3usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_restriction__bindgen_ty_1 { + pub register_op: __u8, + pub sqe_op: __u8, + pub sqe_flags: __u8, +} +#[test] +fn bindgen_test_layout_io_uring_restriction__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(io_uring_restriction__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(io_uring_restriction__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).register_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(register_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sqe_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(sqe_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sqe_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(sqe_flags) + ) + ); +} +impl Default for io_uring_restriction__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_restriction() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_restriction)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_restriction)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(resv2) + ) + ); +} +impl Default for io_uring_restriction { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf { + pub addr: __u64, + pub len: __u32, + pub bid: __u16, + pub resv: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_buf() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(bid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +pub struct io_uring_buf_ring { + pub __bindgen_anon_1: io_uring_buf_ring__bindgen_ty_1, +} +#[repr(C)] +pub struct io_uring_buf_ring__bindgen_ty_1 { + pub __bindgen_anon_1: __BindgenUnionField, + pub __bindgen_anon_2: __BindgenUnionField, + pub bindgen_union_field: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1 { + pub resv1: __u64, + pub resv2: __u32, + pub resv3: __u16, + pub tail: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv3) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv3) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(tail) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2 { + pub __empty_bufs: io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, + pub bufs: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() { + assert_eq!( + ::core::mem::size_of::(), + 0usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 0usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__empty_bufs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(__empty_bufs) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bufs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(bufs) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1() { + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf_ring__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_ring__bindgen_ty_1)) + ); +} +impl Default for io_uring_buf_ring__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring() { + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf_ring)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_ring)) + ); +} +impl Default for io_uring_buf_ring { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const IOU_PBUF_RING_MMAP: io_uring_register_pbuf_ring_flags = 1; +pub type io_uring_register_pbuf_ring_flags = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_reg { + pub ring_addr: __u64, + pub ring_entries: __u32, + pub bgid: __u16, + pub flags: __u16, + pub resv: [__u64; 3usize], +} +#[test] +fn bindgen_test_layout_io_uring_buf_reg() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_uring_buf_reg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_reg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(ring_addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bgid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(bgid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_status { + pub buf_group: __u32, + pub head: __u32, + pub resv: [__u32; 8usize], +} +#[test] +fn bindgen_test_layout_io_uring_buf_status() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_uring_buf_status)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_buf_status)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(buf_group) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_napi { + pub busy_poll_to: __u32, + pub prefer_busy_poll: __u8, + pub pad: [__u8; 3usize], + pub resv: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_napi() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_napi)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_napi)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).busy_poll_to) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(busy_poll_to) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).prefer_busy_poll) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(prefer_busy_poll) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(resv) + ) + ); +} +pub const IORING_RESTRICTION_REGISTER_OP: io_uring_register_restriction_op = 0; +pub const IORING_RESTRICTION_SQE_OP: io_uring_register_restriction_op = 1; +pub const IORING_RESTRICTION_SQE_FLAGS_ALLOWED: io_uring_register_restriction_op = 2; +pub const IORING_RESTRICTION_SQE_FLAGS_REQUIRED: io_uring_register_restriction_op = 3; +pub const IORING_RESTRICTION_LAST: io_uring_register_restriction_op = 4; +pub type io_uring_register_restriction_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_getevents_arg { + pub sigmask: __u64, + pub sigmask_sz: __u32, + pub pad: __u32, + pub ts: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_getevents_arg() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(io_uring_getevents_arg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_getevents_arg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sigmask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(sigmask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sigmask_sz) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(sigmask_sz) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ts) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(ts) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sync_cancel_reg { + pub addr: __u64, + pub fd: __s32, + pub flags: __u32, + pub timeout: __kernel_timespec, + pub opcode: __u8, + pub pad: [__u8; 7usize], + pub pad2: [__u64; 3usize], +} +#[test] +fn bindgen_test_layout_io_uring_sync_cancel_reg() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(io_uring_sync_cancel_reg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sync_cancel_reg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(timeout) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(pad2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_file_index_range { + pub off: __u32, + pub len: __u32, + pub resv: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_file_index_range() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_file_index_range)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_file_index_range)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_recvmsg_out { + pub namelen: __u32, + pub controllen: __u32, + pub payloadlen: __u32, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_recvmsg_out() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_recvmsg_out)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_recvmsg_out)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).namelen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(namelen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).controllen) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(controllen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).payloadlen) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(payloadlen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(flags) + ) + ); +} +pub const SOCKET_URING_OP_SIOCINQ: io_uring_socket_op = 0; +pub const SOCKET_URING_OP_SIOCOUTQ: io_uring_socket_op = 1; +pub const SOCKET_URING_OP_GETSOCKOPT: io_uring_socket_op = 2; +pub const SOCKET_URING_OP_SETSOCKOPT: io_uring_socket_op = 3; +pub type io_uring_socket_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct futex_waitv { + pub val: __u64, + pub uaddr: __u64, + pub flags: __u32, + pub __reserved: __u32, +} +#[test] +fn bindgen_test_layout_futex_waitv() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(futex_waitv)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(futex_waitv)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(val) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(uaddr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(__reserved) + ) + ); +} diff --git a/src/sys/sys_x86-64.rs b/src/sys/sys_x86-64.rs new file mode 100644 index 00000000..d33bc714 --- /dev/null +++ b/src/sys/sys_x86-64.rs @@ -0,0 +1,2986 @@ +/* automatically generated by rust-bindgen 0.69.4 */ + +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +#[repr(C)] +pub struct __BindgenUnionField(::core::marker::PhantomData); +impl __BindgenUnionField { + #[inline] + pub const fn new() -> Self { + __BindgenUnionField(::core::marker::PhantomData) + } + #[inline] + pub unsafe fn as_ref(&self) -> &T { + ::core::mem::transmute(self) + } + #[inline] + pub unsafe fn as_mut(&mut self) -> &mut T { + ::core::mem::transmute(self) + } +} +impl ::core::default::Default for __BindgenUnionField { + #[inline] + fn default() -> Self { + Self::new() + } +} +impl ::core::clone::Clone for __BindgenUnionField { + #[inline] + fn clone(&self) -> Self { + *self + } +} +impl ::core::marker::Copy for __BindgenUnionField {} +impl ::core::fmt::Debug for __BindgenUnionField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__BindgenUnionField") + } +} +impl ::core::hash::Hash for __BindgenUnionField { + fn hash(&self, _state: &mut H) {} +} +impl ::core::cmp::PartialEq for __BindgenUnionField { + fn eq(&self, _other: &__BindgenUnionField) -> bool { + true + } +} +impl ::core::cmp::Eq for __BindgenUnionField {} +pub const __NR_io_uring_setup: u32 = 425; +pub const __NR_io_uring_enter: u32 = 426; +pub const __NR_io_uring_register: u32 = 427; +pub const IORING_FILE_INDEX_ALLOC: i32 = -1; +pub const IORING_SETUP_IOPOLL: u32 = 1; +pub const IORING_SETUP_SQPOLL: u32 = 2; +pub const IORING_SETUP_SQ_AFF: u32 = 4; +pub const IORING_SETUP_CQSIZE: u32 = 8; +pub const IORING_SETUP_CLAMP: u32 = 16; +pub const IORING_SETUP_ATTACH_WQ: u32 = 32; +pub const IORING_SETUP_R_DISABLED: u32 = 64; +pub const IORING_SETUP_SUBMIT_ALL: u32 = 128; +pub const IORING_SETUP_COOP_TASKRUN: u32 = 256; +pub const IORING_SETUP_TASKRUN_FLAG: u32 = 512; +pub const IORING_SETUP_SQE128: u32 = 1024; +pub const IORING_SETUP_CQE32: u32 = 2048; +pub const IORING_SETUP_SINGLE_ISSUER: u32 = 4096; +pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; +pub const IORING_SETUP_NO_MMAP: u32 = 16384; +pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; +pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_URING_CMD_FIXED: u32 = 1; +pub const IORING_URING_CMD_MASK: u32 = 1; +pub const IORING_FSYNC_DATASYNC: u32 = 1; +pub const IORING_TIMEOUT_ABS: u32 = 1; +pub const IORING_TIMEOUT_UPDATE: u32 = 2; +pub const IORING_TIMEOUT_BOOTTIME: u32 = 4; +pub const IORING_TIMEOUT_REALTIME: u32 = 8; +pub const IORING_LINK_TIMEOUT_UPDATE: u32 = 16; +pub const IORING_TIMEOUT_ETIME_SUCCESS: u32 = 32; +pub const IORING_TIMEOUT_MULTISHOT: u32 = 64; +pub const IORING_TIMEOUT_CLOCK_MASK: u32 = 12; +pub const IORING_TIMEOUT_UPDATE_MASK: u32 = 18; +pub const SPLICE_F_FD_IN_FIXED: u32 = 2147483648; +pub const IORING_POLL_ADD_MULTI: u32 = 1; +pub const IORING_POLL_UPDATE_EVENTS: u32 = 2; +pub const IORING_POLL_UPDATE_USER_DATA: u32 = 4; +pub const IORING_POLL_ADD_LEVEL: u32 = 8; +pub const IORING_ASYNC_CANCEL_ALL: u32 = 1; +pub const IORING_ASYNC_CANCEL_FD: u32 = 2; +pub const IORING_ASYNC_CANCEL_ANY: u32 = 4; +pub const IORING_ASYNC_CANCEL_FD_FIXED: u32 = 8; +pub const IORING_ASYNC_CANCEL_USERDATA: u32 = 16; +pub const IORING_ASYNC_CANCEL_OP: u32 = 32; +pub const IORING_RECVSEND_POLL_FIRST: u32 = 1; +pub const IORING_RECV_MULTISHOT: u32 = 2; +pub const IORING_RECVSEND_FIXED_BUF: u32 = 4; +pub const IORING_SEND_ZC_REPORT_USAGE: u32 = 8; +pub const IORING_RECVSEND_BUNDLE: u32 = 16; +pub const IORING_NOTIF_USAGE_ZC_COPIED: u32 = 2147483648; +pub const IORING_ACCEPT_MULTISHOT: u32 = 1; +pub const IORING_ACCEPT_DONTWAIT: u32 = 2; +pub const IORING_ACCEPT_POLL_FIRST: u32 = 4; +pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; +pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; +pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; +pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_CQE_F_BUFFER: u32 = 1; +pub const IORING_CQE_F_MORE: u32 = 2; +pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; +pub const IORING_CQE_F_NOTIF: u32 = 8; +pub const IORING_CQE_BUFFER_SHIFT: u32 = 16; +pub const IORING_OFF_SQ_RING: u32 = 0; +pub const IORING_OFF_CQ_RING: u32 = 134217728; +pub const IORING_OFF_SQES: u32 = 268435456; +pub const IORING_OFF_PBUF_RING: u32 = 2147483648; +pub const IORING_OFF_PBUF_SHIFT: u32 = 16; +pub const IORING_OFF_MMAP_MASK: u32 = 4160749568; +pub const IORING_SQ_NEED_WAKEUP: u32 = 1; +pub const IORING_SQ_CQ_OVERFLOW: u32 = 2; +pub const IORING_SQ_TASKRUN: u32 = 4; +pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1; +pub const IORING_ENTER_GETEVENTS: u32 = 1; +pub const IORING_ENTER_SQ_WAKEUP: u32 = 2; +pub const IORING_ENTER_SQ_WAIT: u32 = 4; +pub const IORING_ENTER_EXT_ARG: u32 = 8; +pub const IORING_ENTER_REGISTERED_RING: u32 = 16; +pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; +pub const IORING_FEAT_NODROP: u32 = 2; +pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; +pub const IORING_FEAT_RW_CUR_POS: u32 = 8; +pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16; +pub const IORING_FEAT_FAST_POLL: u32 = 32; +pub const IORING_FEAT_POLL_32BITS: u32 = 64; +pub const IORING_FEAT_SQPOLL_NONFIXED: u32 = 128; +pub const IORING_FEAT_EXT_ARG: u32 = 256; +pub const IORING_FEAT_NATIVE_WORKERS: u32 = 512; +pub const IORING_FEAT_RSRC_TAGS: u32 = 1024; +pub const IORING_FEAT_CQE_SKIP: u32 = 2048; +pub const IORING_FEAT_LINKED_FILE: u32 = 4096; +pub const IORING_FEAT_REG_REG_RING: u32 = 8192; +pub const IORING_FEAT_RECVSEND_BUNDLE: u32 = 16384; +pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; +pub const IORING_REGISTER_FILES_SKIP: i32 = -2; +pub const IO_URING_OP_SUPPORTED: u32 = 1; +pub type __u8 = libc::c_uchar; +pub type __u16 = libc::c_ushort; +pub type __s32 = libc::c_int; +pub type __u32 = libc::c_uint; +pub type __u64 = libc::c_ulonglong; +pub type __kernel_time64_t = libc::c_longlong; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __kernel_timespec { + pub tv_sec: __kernel_time64_t, + pub tv_nsec: libc::c_longlong, +} +#[test] +fn bindgen_test_layout___kernel_timespec() { + const UNINIT: ::core::mem::MaybeUninit<__kernel_timespec> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<__kernel_timespec>(), + 16usize, + concat!("Size of: ", stringify!(__kernel_timespec)) + ); + assert_eq!( + ::core::mem::align_of::<__kernel_timespec>(), + 8usize, + concat!("Alignment of ", stringify!(__kernel_timespec)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_timespec), + "::", + stringify!(tv_sec) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__kernel_timespec), + "::", + stringify!(tv_nsec) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct open_how { + pub flags: __u64, + pub mode: __u64, + pub resolve: __u64, +} +#[test] +fn bindgen_test_layout_open_how() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(open_how)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(open_how)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(mode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resolve) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(open_how), + "::", + stringify!(resolve) + ) + ); +} +pub type __kernel_rwf_t = libc::c_int; +#[repr(C)] +pub struct io_uring_sqe { + pub opcode: __u8, + pub flags: __u8, + pub ioprio: __u16, + pub fd: __s32, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1, + pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2, + pub len: __u32, + pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3, + pub user_data: __u64, + pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4, + pub personality: __u16, + pub __bindgen_anon_5: io_uring_sqe__bindgen_ty_5, + pub __bindgen_anon_6: io_uring_sqe__bindgen_ty_6, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_1 { + pub off: __u64, + pub addr2: __u64, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_1__bindgen_ty_1 { + pub cmd_op: __u32, + pub __pad1: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cmd_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(cmd_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(__pad1) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1), + "::", + stringify!(off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr2) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_1), + "::", + stringify!(addr2) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_2 { + pub addr: __u64, + pub splice_off_in: __u64, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_2__bindgen_ty_1 { + pub level: __u32, + pub optname: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optname) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(optname) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_2)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_2)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_off_in) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_2), + "::", + stringify!(splice_off_in) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_3 { + pub rw_flags: __kernel_rwf_t, + pub fsync_flags: __u32, + pub poll_events: __u16, + pub poll32_events: __u32, + pub sync_range_flags: __u32, + pub msg_flags: __u32, + pub timeout_flags: __u32, + pub accept_flags: __u32, + pub cancel_flags: __u32, + pub open_flags: __u32, + pub statx_flags: __u32, + pub fadvise_advice: __u32, + pub splice_flags: __u32, + pub rename_flags: __u32, + pub unlink_flags: __u32, + pub hardlink_flags: __u32, + pub xattr_flags: __u32, + pub msg_ring_flags: __u32, + pub uring_cmd_flags: __u32, + pub waitid_flags: __u32, + pub futex_flags: __u32, + pub install_fd_flags: __u32, + pub nop_flags: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_3() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_3)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_3)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rw_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(rw_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fsync_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(fsync_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).poll_events) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(poll_events) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).poll32_events) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(poll32_events) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sync_range_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(sync_range_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(msg_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).timeout_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(timeout_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).accept_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(accept_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cancel_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(cancel_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).open_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(open_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).statx_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(statx_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fadvise_advice) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(fadvise_advice) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(splice_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rename_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(rename_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).unlink_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(unlink_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).hardlink_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(hardlink_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xattr_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(xattr_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).msg_ring_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(msg_ring_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).uring_cmd_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(uring_cmd_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).waitid_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(waitid_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).futex_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(futex_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).install_fd_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(install_fd_flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nop_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_3), + "::", + stringify!(nop_flags) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_3 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_4 { + pub buf_index: __u16, + pub buf_group: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_4() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_4)) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_4)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_4), + "::", + stringify!(buf_index) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_4), + "::", + stringify!(buf_group) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_4 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_sqe__bindgen_ty_5 { + pub splice_fd_in: __s32, + pub file_index: __u32, + pub optlen: __u32, + pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_5__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_5__bindgen_ty_1 { + pub addr_len: __u16, + pub __pad3: [__u16; 1usize], +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 2usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr_len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), + "::", + stringify!(addr_len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5__bindgen_ty_1), + "::", + stringify!(__pad3) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_5)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_5)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).splice_fd_in) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(splice_fd_in) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).file_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(file_index) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optlen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_5), + "::", + stringify!(optlen) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +pub struct io_uring_sqe__bindgen_ty_6 { + pub __bindgen_anon_1: __BindgenUnionField, + pub optval: __BindgenUnionField<__u64>, + pub cmd: __BindgenUnionField<[__u8; 0usize]>, + pub bindgen_union_field: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sqe__bindgen_ty_6__bindgen_ty_1 { + pub addr3: __u64, + pub __pad2: [__u64; 1usize], +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr3) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), + "::", + stringify!(addr3) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6__bindgen_ty_1), + "::", + stringify!(__pad2) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_sqe__bindgen_ty_6)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe__bindgen_ty_6)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).optval) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6), + "::", + stringify!(optval) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe__bindgen_ty_6), + "::", + stringify!(cmd) + ) + ); +} +impl Default for io_uring_sqe__bindgen_ty_6 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_sqe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(io_uring_sqe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sqe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ioprio) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(ioprio) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(user_data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).personality) as usize - ptr as usize }, + 42usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sqe), + "::", + stringify!(personality) + ) + ); +} +impl Default for io_uring_sqe { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const IOSQE_FIXED_FILE_BIT: io_uring_sqe_flags_bit = 0; +pub const IOSQE_IO_DRAIN_BIT: io_uring_sqe_flags_bit = 1; +pub const IOSQE_IO_LINK_BIT: io_uring_sqe_flags_bit = 2; +pub const IOSQE_IO_HARDLINK_BIT: io_uring_sqe_flags_bit = 3; +pub const IOSQE_ASYNC_BIT: io_uring_sqe_flags_bit = 4; +pub const IOSQE_BUFFER_SELECT_BIT: io_uring_sqe_flags_bit = 5; +pub const IOSQE_CQE_SKIP_SUCCESS_BIT: io_uring_sqe_flags_bit = 6; +pub type io_uring_sqe_flags_bit = libc::c_uint; +pub const IORING_OP_NOP: io_uring_op = 0; +pub const IORING_OP_READV: io_uring_op = 1; +pub const IORING_OP_WRITEV: io_uring_op = 2; +pub const IORING_OP_FSYNC: io_uring_op = 3; +pub const IORING_OP_READ_FIXED: io_uring_op = 4; +pub const IORING_OP_WRITE_FIXED: io_uring_op = 5; +pub const IORING_OP_POLL_ADD: io_uring_op = 6; +pub const IORING_OP_POLL_REMOVE: io_uring_op = 7; +pub const IORING_OP_SYNC_FILE_RANGE: io_uring_op = 8; +pub const IORING_OP_SENDMSG: io_uring_op = 9; +pub const IORING_OP_RECVMSG: io_uring_op = 10; +pub const IORING_OP_TIMEOUT: io_uring_op = 11; +pub const IORING_OP_TIMEOUT_REMOVE: io_uring_op = 12; +pub const IORING_OP_ACCEPT: io_uring_op = 13; +pub const IORING_OP_ASYNC_CANCEL: io_uring_op = 14; +pub const IORING_OP_LINK_TIMEOUT: io_uring_op = 15; +pub const IORING_OP_CONNECT: io_uring_op = 16; +pub const IORING_OP_FALLOCATE: io_uring_op = 17; +pub const IORING_OP_OPENAT: io_uring_op = 18; +pub const IORING_OP_CLOSE: io_uring_op = 19; +pub const IORING_OP_FILES_UPDATE: io_uring_op = 20; +pub const IORING_OP_STATX: io_uring_op = 21; +pub const IORING_OP_READ: io_uring_op = 22; +pub const IORING_OP_WRITE: io_uring_op = 23; +pub const IORING_OP_FADVISE: io_uring_op = 24; +pub const IORING_OP_MADVISE: io_uring_op = 25; +pub const IORING_OP_SEND: io_uring_op = 26; +pub const IORING_OP_RECV: io_uring_op = 27; +pub const IORING_OP_OPENAT2: io_uring_op = 28; +pub const IORING_OP_EPOLL_CTL: io_uring_op = 29; +pub const IORING_OP_SPLICE: io_uring_op = 30; +pub const IORING_OP_PROVIDE_BUFFERS: io_uring_op = 31; +pub const IORING_OP_REMOVE_BUFFERS: io_uring_op = 32; +pub const IORING_OP_TEE: io_uring_op = 33; +pub const IORING_OP_SHUTDOWN: io_uring_op = 34; +pub const IORING_OP_RENAMEAT: io_uring_op = 35; +pub const IORING_OP_UNLINKAT: io_uring_op = 36; +pub const IORING_OP_MKDIRAT: io_uring_op = 37; +pub const IORING_OP_SYMLINKAT: io_uring_op = 38; +pub const IORING_OP_LINKAT: io_uring_op = 39; +pub const IORING_OP_MSG_RING: io_uring_op = 40; +pub const IORING_OP_FSETXATTR: io_uring_op = 41; +pub const IORING_OP_SETXATTR: io_uring_op = 42; +pub const IORING_OP_FGETXATTR: io_uring_op = 43; +pub const IORING_OP_GETXATTR: io_uring_op = 44; +pub const IORING_OP_SOCKET: io_uring_op = 45; +pub const IORING_OP_URING_CMD: io_uring_op = 46; +pub const IORING_OP_SEND_ZC: io_uring_op = 47; +pub const IORING_OP_SENDMSG_ZC: io_uring_op = 48; +pub const IORING_OP_READ_MULTISHOT: io_uring_op = 49; +pub const IORING_OP_WAITID: io_uring_op = 50; +pub const IORING_OP_FUTEX_WAIT: io_uring_op = 51; +pub const IORING_OP_FUTEX_WAKE: io_uring_op = 52; +pub const IORING_OP_FUTEX_WAITV: io_uring_op = 53; +pub const IORING_OP_FIXED_FD_INSTALL: io_uring_op = 54; +pub const IORING_OP_FTRUNCATE: io_uring_op = 55; +pub const IORING_OP_LAST: io_uring_op = 56; +pub type io_uring_op = libc::c_uint; +pub const IORING_MSG_DATA: io_uring_msg_ring_flags = 0; +pub const IORING_MSG_SEND_FD: io_uring_msg_ring_flags = 1; +pub type io_uring_msg_ring_flags = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_cqe { + pub user_data: __u64, + pub res: __s32, + pub flags: __u32, + pub big_cqe: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_io_uring_cqe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_cqe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_cqe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(user_data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(res) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).big_cqe) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_cqe), + "::", + stringify!(big_cqe) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_sqring_offsets { + pub head: __u32, + pub tail: __u32, + pub ring_mask: __u32, + pub ring_entries: __u32, + pub flags: __u32, + pub dropped: __u32, + pub array: __u32, + pub resv1: __u32, + pub user_addr: __u64, +} +#[test] +fn bindgen_test_layout_io_sqring_offsets() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_sqring_offsets)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_sqring_offsets)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(ring_mask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).dropped) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(dropped) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_sqring_offsets), + "::", + stringify!(user_addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_cqring_offsets { + pub head: __u32, + pub tail: __u32, + pub ring_mask: __u32, + pub ring_entries: __u32, + pub overflow: __u32, + pub cqes: __u32, + pub flags: __u32, + pub resv1: __u32, + pub user_addr: __u64, +} +#[test] +fn bindgen_test_layout_io_cqring_offsets() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_cqring_offsets)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_cqring_offsets)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(ring_mask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).overflow) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(overflow) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cqes) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(cqes) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_cqring_offsets), + "::", + stringify!(user_addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_params { + pub sq_entries: __u32, + pub cq_entries: __u32, + pub flags: __u32, + pub sq_thread_cpu: __u32, + pub sq_thread_idle: __u32, + pub features: __u32, + pub wq_fd: __u32, + pub resv: [__u32; 3usize], + pub sq_off: io_sqring_offsets, + pub cq_off: io_cqring_offsets, +} +#[test] +fn bindgen_test_layout_io_uring_params() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(io_uring_params)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_params)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_entries) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cq_entries) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(cq_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_cpu) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_thread_cpu) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_thread_idle) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_thread_idle) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).features) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(features) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).wq_fd) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(wq_fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sq_off) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(sq_off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cq_off) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(io_uring_params), + "::", + stringify!(cq_off) + ) + ); +} +pub const IORING_REGISTER_BUFFERS: io_uring_register_op = 0; +pub const IORING_UNREGISTER_BUFFERS: io_uring_register_op = 1; +pub const IORING_REGISTER_FILES: io_uring_register_op = 2; +pub const IORING_UNREGISTER_FILES: io_uring_register_op = 3; +pub const IORING_REGISTER_EVENTFD: io_uring_register_op = 4; +pub const IORING_UNREGISTER_EVENTFD: io_uring_register_op = 5; +pub const IORING_REGISTER_FILES_UPDATE: io_uring_register_op = 6; +pub const IORING_REGISTER_EVENTFD_ASYNC: io_uring_register_op = 7; +pub const IORING_REGISTER_PROBE: io_uring_register_op = 8; +pub const IORING_REGISTER_PERSONALITY: io_uring_register_op = 9; +pub const IORING_UNREGISTER_PERSONALITY: io_uring_register_op = 10; +pub const IORING_REGISTER_RESTRICTIONS: io_uring_register_op = 11; +pub const IORING_REGISTER_ENABLE_RINGS: io_uring_register_op = 12; +pub const IORING_REGISTER_FILES2: io_uring_register_op = 13; +pub const IORING_REGISTER_FILES_UPDATE2: io_uring_register_op = 14; +pub const IORING_REGISTER_BUFFERS2: io_uring_register_op = 15; +pub const IORING_REGISTER_BUFFERS_UPDATE: io_uring_register_op = 16; +pub const IORING_REGISTER_IOWQ_AFF: io_uring_register_op = 17; +pub const IORING_UNREGISTER_IOWQ_AFF: io_uring_register_op = 18; +pub const IORING_REGISTER_IOWQ_MAX_WORKERS: io_uring_register_op = 19; +pub const IORING_REGISTER_RING_FDS: io_uring_register_op = 20; +pub const IORING_UNREGISTER_RING_FDS: io_uring_register_op = 21; +pub const IORING_REGISTER_PBUF_RING: io_uring_register_op = 22; +pub const IORING_UNREGISTER_PBUF_RING: io_uring_register_op = 23; +pub const IORING_REGISTER_SYNC_CANCEL: io_uring_register_op = 24; +pub const IORING_REGISTER_FILE_ALLOC_RANGE: io_uring_register_op = 25; +pub const IORING_REGISTER_PBUF_STATUS: io_uring_register_op = 26; +pub const IORING_REGISTER_NAPI: io_uring_register_op = 27; +pub const IORING_UNREGISTER_NAPI: io_uring_register_op = 28; +pub const IORING_REGISTER_LAST: io_uring_register_op = 29; +pub const IORING_REGISTER_USE_REGISTERED_RING: io_uring_register_op = 2147483648; +pub type io_uring_register_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_files_update { + pub offset: __u32, + pub resv: __u32, + pub fds: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_files_update() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_files_update)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_files_update)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fds) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_files_update), + "::", + stringify!(fds) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_register { + pub nr: __u32, + pub flags: __u32, + pub resv2: __u64, + pub data: __u64, + pub tags: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_register() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(io_uring_rsrc_register)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_register)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_register), + "::", + stringify!(tags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_update { + pub offset: __u32, + pub resv: __u32, + pub data: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_update() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_rsrc_update)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_update)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_rsrc_update2 { + pub offset: __u32, + pub resv: __u32, + pub data: __u64, + pub tags: __u64, + pub nr: __u32, + pub resv2: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_rsrc_update2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(io_uring_rsrc_update2)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_rsrc_update2)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(tags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(io_uring_rsrc_update2), + "::", + stringify!(resv2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_probe_op { + pub op: __u8, + pub resv: __u8, + pub flags: __u16, + pub resv2: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_probe_op() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(io_uring_probe_op)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_probe_op)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe_op), + "::", + stringify!(resv2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_probe { + pub last_op: __u8, + pub ops_len: __u8, + pub resv: __u16, + pub resv2: [__u32; 3usize], + pub ops: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_io_uring_probe() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_probe)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_probe)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).last_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(last_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ops_len) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(ops_len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ops) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_probe), + "::", + stringify!(ops) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct io_uring_restriction { + pub opcode: __u16, + pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1, + pub resv: __u8, + pub resv2: [__u32; 3usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union io_uring_restriction__bindgen_ty_1 { + pub register_op: __u8, + pub sqe_op: __u8, + pub sqe_flags: __u8, +} +#[test] +fn bindgen_test_layout_io_uring_restriction__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(io_uring_restriction__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(io_uring_restriction__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).register_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(register_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sqe_op) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(sqe_op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sqe_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction__bindgen_ty_1), + "::", + stringify!(sqe_flags) + ) + ); +} +impl Default for io_uring_restriction__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_restriction() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_restriction)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_restriction)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(resv) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_restriction), + "::", + stringify!(resv2) + ) + ); +} +impl Default for io_uring_restriction { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf { + pub addr: __u64, + pub len: __u32, + pub bid: __u16, + pub resv: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_buf() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(bid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +pub struct io_uring_buf_ring { + pub __bindgen_anon_1: io_uring_buf_ring__bindgen_ty_1, +} +#[repr(C)] +pub struct io_uring_buf_ring__bindgen_ty_1 { + pub __bindgen_anon_1: __BindgenUnionField, + pub __bindgen_anon_2: __BindgenUnionField, + pub bindgen_union_field: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1 { + pub resv1: __u64, + pub resv2: __u32, + pub resv3: __u16, + pub tail: __u16, +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv1) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv3) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(resv3) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(tail) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2 { + pub __empty_bufs: io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, + pub bufs: __IncompleteArrayField, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() { + assert_eq!( + ::core::mem::size_of::(), + 0usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 0usize, + concat!( + "Size of: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__empty_bufs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(__empty_bufs) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bufs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(bufs) + ) + ); +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring__bindgen_ty_1() { + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf_ring__bindgen_ty_1)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_ring__bindgen_ty_1)) + ); +} +impl Default for io_uring_buf_ring__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout_io_uring_buf_ring() { + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_buf_ring)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_ring)) + ); +} +impl Default for io_uring_buf_ring { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const IOU_PBUF_RING_MMAP: io_uring_register_pbuf_ring_flags = 1; +pub type io_uring_register_pbuf_ring_flags = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_reg { + pub ring_addr: __u64, + pub ring_entries: __u32, + pub bgid: __u16, + pub flags: __u16, + pub resv: [__u64; 3usize], +} +#[test] +fn bindgen_test_layout_io_uring_buf_reg() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_uring_buf_reg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_buf_reg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(ring_addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ring_entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(ring_entries) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).bgid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(bgid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_reg), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_buf_status { + pub buf_group: __u32, + pub head: __u32, + pub resv: [__u32; 8usize], +} +#[test] +fn bindgen_test_layout_io_uring_buf_status() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(io_uring_buf_status)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_buf_status)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).buf_group) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(buf_group) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_buf_status), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_napi { + pub busy_poll_to: __u32, + pub prefer_busy_poll: __u8, + pub pad: [__u8; 3usize], + pub resv: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_napi() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_napi)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_napi)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).busy_poll_to) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(busy_poll_to) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).prefer_busy_poll) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(prefer_busy_poll) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_napi), + "::", + stringify!(resv) + ) + ); +} +pub const IORING_RESTRICTION_REGISTER_OP: io_uring_register_restriction_op = 0; +pub const IORING_RESTRICTION_SQE_OP: io_uring_register_restriction_op = 1; +pub const IORING_RESTRICTION_SQE_FLAGS_ALLOWED: io_uring_register_restriction_op = 2; +pub const IORING_RESTRICTION_SQE_FLAGS_REQUIRED: io_uring_register_restriction_op = 3; +pub const IORING_RESTRICTION_LAST: io_uring_register_restriction_op = 4; +pub type io_uring_register_restriction_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_getevents_arg { + pub sigmask: __u64, + pub sigmask_sz: __u32, + pub pad: __u32, + pub ts: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_getevents_arg() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(io_uring_getevents_arg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_getevents_arg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sigmask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(sigmask) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).sigmask_sz) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(sigmask_sz) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ts) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_getevents_arg), + "::", + stringify!(ts) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_sync_cancel_reg { + pub addr: __u64, + pub fd: __s32, + pub flags: __u32, + pub timeout: __kernel_timespec, + pub opcode: __u8, + pub pad: [__u8; 7usize], + pub pad2: [__u64; 3usize], +} +#[test] +fn bindgen_test_layout_io_uring_sync_cancel_reg() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(io_uring_sync_cancel_reg)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_sync_cancel_reg)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(timeout) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).opcode) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(opcode) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(io_uring_sync_cancel_reg), + "::", + stringify!(pad2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_file_index_range { + pub off: __u32, + pub len: __u32, + pub resv: __u64, +} +#[test] +fn bindgen_test_layout_io_uring_file_index_range() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_file_index_range)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(io_uring_file_index_range)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).off) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(off) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).resv) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_file_index_range), + "::", + stringify!(resv) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct io_uring_recvmsg_out { + pub namelen: __u32, + pub controllen: __u32, + pub payloadlen: __u32, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_io_uring_recvmsg_out() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(io_uring_recvmsg_out)) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(io_uring_recvmsg_out)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).namelen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(namelen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).controllen) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(controllen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).payloadlen) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(payloadlen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(io_uring_recvmsg_out), + "::", + stringify!(flags) + ) + ); +} +pub const SOCKET_URING_OP_SIOCINQ: io_uring_socket_op = 0; +pub const SOCKET_URING_OP_SIOCOUTQ: io_uring_socket_op = 1; +pub const SOCKET_URING_OP_GETSOCKOPT: io_uring_socket_op = 2; +pub const SOCKET_URING_OP_SETSOCKOPT: io_uring_socket_op = 3; +pub type io_uring_socket_op = libc::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct futex_waitv { + pub val: __u64, + pub uaddr: __u64, + pub flags: __u32, + pub __reserved: __u32, +} +#[test] +fn bindgen_test_layout_futex_waitv() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(futex_waitv)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(futex_waitv)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(val) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(uaddr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(futex_waitv), + "::", + stringify!(__reserved) + ) + ); +}