#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(clippy::all)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
pub const RWF_DSYNC: u32 = 0x2;
pub const RWF_SYNC: u32 = 0x4;
pub const RWF_APPEND: u32 = 0x10;
pub const RWF_HIPRI: u32 = 0x1;
pub const RWF_NOWAIT: u32 = 0x8;
#[inline(always)]
pub unsafe fn io_setup(nr: libc::c_long, ctxp: *mut aio_context_t) -> libc::c_long {
syscall(__NR_io_setup as libc::c_long, nr, ctxp)
}
#[inline(always)]
pub unsafe fn io_destroy(ctx: aio_context_t) -> libc::c_long {
syscall(__NR_io_destroy as libc::c_long, ctx)
}
#[inline(always)]
pub unsafe fn io_submit(
ctx: aio_context_t,
nr: libc::c_long,
iocbpp: *mut *mut iocb,
) -> libc::c_long {
syscall(__NR_io_submit as libc::c_long, ctx, nr, iocbpp)
}
#[inline(always)]
pub unsafe fn io_getevents(
ctx: aio_context_t,
min_nr: libc::c_long,
max_nr: libc::c_long,
events: *mut io_event,
timeout: *mut timespec,
) -> libc::c_long {
syscall(
__NR_io_getevents as libc::c_long,
ctx,
min_nr,
max_nr,
events,
timeout,
)
}