pub const IORING_SETUP_SQPOLL: u32 = 2;
pub const IORING_SETUP_R_DISABLED: u32 = 64;
pub const IORING_SETUP_NO_MMAP: u32 = 16384;
pub const IORING_SETUP_NO_SQARRAY: u32 = 65536;
pub const IORING_SQ_NEED_WAKEUP: u32 = 1;
pub const IORING_ENTER_SQ_WAKEUP: u32 = 2;
pub type __u8 = ::std::os::raw::c_uchar;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __u32 = ::std::os::raw::c_uint;
pub type __u64 = ::std::os::raw::c_ulonglong;
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of io_sqring_offsets"][::std::mem::size_of::<io_sqring_offsets>() - 40usize];
["Alignment of io_sqring_offsets"][::std::mem::align_of::<io_sqring_offsets>() - 8usize];
["Offset of field: io_sqring_offsets::head"]
[::std::mem::offset_of!(io_sqring_offsets, head) - 0usize];
["Offset of field: io_sqring_offsets::tail"]
[::std::mem::offset_of!(io_sqring_offsets, tail) - 4usize];
["Offset of field: io_sqring_offsets::ring_mask"]
[::std::mem::offset_of!(io_sqring_offsets, ring_mask) - 8usize];
["Offset of field: io_sqring_offsets::ring_entries"]
[::std::mem::offset_of!(io_sqring_offsets, ring_entries) - 12usize];
["Offset of field: io_sqring_offsets::flags"]
[::std::mem::offset_of!(io_sqring_offsets, flags) - 16usize];
["Offset of field: io_sqring_offsets::dropped"]
[::std::mem::offset_of!(io_sqring_offsets, dropped) - 20usize];
["Offset of field: io_sqring_offsets::array"]
[::std::mem::offset_of!(io_sqring_offsets, array) - 24usize];
["Offset of field: io_sqring_offsets::resv1"]
[::std::mem::offset_of!(io_sqring_offsets, resv1) - 28usize];
["Offset of field: io_sqring_offsets::user_addr"]
[::std::mem::offset_of!(io_sqring_offsets, user_addr) - 32usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of io_cqring_offsets"][::std::mem::size_of::<io_cqring_offsets>() - 40usize];
["Alignment of io_cqring_offsets"][::std::mem::align_of::<io_cqring_offsets>() - 8usize];
["Offset of field: io_cqring_offsets::head"]
[::std::mem::offset_of!(io_cqring_offsets, head) - 0usize];
["Offset of field: io_cqring_offsets::tail"]
[::std::mem::offset_of!(io_cqring_offsets, tail) - 4usize];
["Offset of field: io_cqring_offsets::ring_mask"]
[::std::mem::offset_of!(io_cqring_offsets, ring_mask) - 8usize];
["Offset of field: io_cqring_offsets::ring_entries"]
[::std::mem::offset_of!(io_cqring_offsets, ring_entries) - 12usize];
["Offset of field: io_cqring_offsets::overflow"]
[::std::mem::offset_of!(io_cqring_offsets, overflow) - 16usize];
["Offset of field: io_cqring_offsets::cqes"]
[::std::mem::offset_of!(io_cqring_offsets, cqes) - 20usize];
["Offset of field: io_cqring_offsets::flags"]
[::std::mem::offset_of!(io_cqring_offsets, flags) - 24usize];
["Offset of field: io_cqring_offsets::resv1"]
[::std::mem::offset_of!(io_cqring_offsets, resv1) - 28usize];
["Offset of field: io_cqring_offsets::user_addr"]
[::std::mem::offset_of!(io_cqring_offsets, user_addr) - 32usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of io_uring_params"][::std::mem::size_of::<io_uring_params>() - 120usize];
["Alignment of io_uring_params"][::std::mem::align_of::<io_uring_params>() - 8usize];
["Offset of field: io_uring_params::sq_entries"]
[::std::mem::offset_of!(io_uring_params, sq_entries) - 0usize];
["Offset of field: io_uring_params::cq_entries"]
[::std::mem::offset_of!(io_uring_params, cq_entries) - 4usize];
["Offset of field: io_uring_params::flags"]
[::std::mem::offset_of!(io_uring_params, flags) - 8usize];
["Offset of field: io_uring_params::sq_thread_cpu"]
[::std::mem::offset_of!(io_uring_params, sq_thread_cpu) - 12usize];
["Offset of field: io_uring_params::sq_thread_idle"]
[::std::mem::offset_of!(io_uring_params, sq_thread_idle) - 16usize];
["Offset of field: io_uring_params::features"]
[::std::mem::offset_of!(io_uring_params, features) - 20usize];
["Offset of field: io_uring_params::wq_fd"]
[::std::mem::offset_of!(io_uring_params, wq_fd) - 24usize];
["Offset of field: io_uring_params::resv"]
[::std::mem::offset_of!(io_uring_params, resv) - 28usize];
["Offset of field: io_uring_params::sq_off"]
[::std::mem::offset_of!(io_uring_params, sq_off) - 40usize];
["Offset of field: io_uring_params::cq_off"]
[::std::mem::offset_of!(io_uring_params, cq_off) - 80usize];
};
#[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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of io_uring_restriction__bindgen_ty_1"]
[::std::mem::size_of::<io_uring_restriction__bindgen_ty_1>() - 1usize];
["Alignment of io_uring_restriction__bindgen_ty_1"]
[::std::mem::align_of::<io_uring_restriction__bindgen_ty_1>() - 1usize];
["Offset of field: io_uring_restriction__bindgen_ty_1::register_op"]
[::std::mem::offset_of!(io_uring_restriction__bindgen_ty_1, register_op) - 0usize];
["Offset of field: io_uring_restriction__bindgen_ty_1::sqe_op"]
[::std::mem::offset_of!(io_uring_restriction__bindgen_ty_1, sqe_op) - 0usize];
["Offset of field: io_uring_restriction__bindgen_ty_1::sqe_flags"]
[::std::mem::offset_of!(io_uring_restriction__bindgen_ty_1, sqe_flags) - 0usize];
};
impl Default for io_uring_restriction__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of io_uring_restriction"][::std::mem::size_of::<io_uring_restriction>() - 16usize];
["Alignment of io_uring_restriction"][::std::mem::align_of::<io_uring_restriction>() - 4usize];
["Offset of field: io_uring_restriction::opcode"]
[::std::mem::offset_of!(io_uring_restriction, opcode) - 0usize];
["Offset of field: io_uring_restriction::resv"]
[::std::mem::offset_of!(io_uring_restriction, resv) - 3usize];
["Offset of field: io_uring_restriction::resv2"]
[::std::mem::offset_of!(io_uring_restriction, resv2) - 4usize];
};
impl Default for io_uring_restriction {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}