1
2
3
/* automatically generated by rust-bindgen */

pub type __s16 = :: std :: os :: raw :: c_short ; pub type __u16 = :: std :: os :: raw :: c_ushort ; pub type __u32 = :: std :: os :: raw :: c_uint ; pub type __s64 = :: std :: os :: raw :: c_longlong ; pub type __u64 = :: std :: os :: raw :: c_ulonglong ; pub type __kernel_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __kernel_rwf_t = :: std :: os :: raw :: c_int ; pub type aio_context_t = __kernel_ulong_t ; pub const IOCB_CMD_PREAD : _bindgen_ty_1 = 0 ; pub const IOCB_CMD_PWRITE : _bindgen_ty_1 = 1 ; pub const IOCB_CMD_FSYNC : _bindgen_ty_1 = 2 ; pub const IOCB_CMD_FDSYNC : _bindgen_ty_1 = 3 ; pub const IOCB_CMD_NOOP : _bindgen_ty_1 = 6 ; pub const IOCB_CMD_PREADV : _bindgen_ty_1 = 7 ; pub const IOCB_CMD_PWRITEV : _bindgen_ty_1 = 8 ; pub type _bindgen_ty_1 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct io_event { pub data : __u64 , pub obj : __u64 , pub res : __s64 , pub res2 : __s64 , } # [ test ] fn bindgen_test_layout_io_event ( ) { assert_eq ! ( :: std :: mem :: size_of :: < io_event > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( io_event ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < io_event > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( io_event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_event > ( ) ) ) . data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( io_event ) , "::" , stringify ! ( data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_event > ( ) ) ) . obj as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( io_event ) , "::" , stringify ! ( obj ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_event > ( ) ) ) . res as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( io_event ) , "::" , stringify ! ( res ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < io_event > ( ) ) ) . res2 as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( io_event ) , "::" , stringify ! ( res2 ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct iocb { pub aio_data : __u64 , pub aio_key : __u32 , pub aio_rw_flags : __kernel_rwf_t , pub aio_lio_opcode : __u16 , pub aio_reqprio : __s16 , pub aio_fildes : __u32 , pub aio_buf : __u64 , pub aio_nbytes : __u64 , pub aio_offset : __s64 , pub aio_reserved2 : __u64 , pub aio_flags : __u32 , pub aio_resfd : __u32 , } # [ test ] fn bindgen_test_layout_iocb ( ) { assert_eq ! ( :: std :: mem :: size_of :: < iocb > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( iocb ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < iocb > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( iocb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_key as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_rw_flags as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_rw_flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_lio_opcode as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_lio_opcode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_reqprio as * const _ as usize } , 18usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_reqprio ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_fildes as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_fildes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_buf as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_nbytes as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_nbytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_offset as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_reserved2 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_reserved2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_flags as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iocb > ( ) ) ) . aio_resfd as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( iocb ) , "::" , stringify ! ( aio_resfd ) ) ) ; }