1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef __LINUX__AIO_ABI_H 8 #define __LINUX__AIO_ABI_H 9 #include <linux/types.h> 10 #include <linux/fs.h> 11 #include <asm/byteorder.h> 12 typedef __kernel_ulong_t aio_context_t; 13 enum { 14 IOCB_CMD_PREAD = 0, 15 IOCB_CMD_PWRITE = 1, 16 IOCB_CMD_FSYNC = 2, 17 IOCB_CMD_FDSYNC = 3, 18 IOCB_CMD_POLL = 5, 19 IOCB_CMD_NOOP = 6, 20 IOCB_CMD_PREADV = 7, 21 IOCB_CMD_PWRITEV = 8, 22 }; 23 #define IOCB_FLAG_RESFD (1 << 0) 24 #define IOCB_FLAG_IOPRIO (1 << 1) 25 struct io_event { 26 __u64 data; 27 __u64 obj; 28 __s64 res; 29 __s64 res2; 30 }; 31 struct iocb { 32 __u64 aio_data; 33 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) 34 __u32 aio_key; 35 __kernel_rwf_t aio_rw_flags; 36 #elif defined(__BYTE_ORDER)?__BYTE_ORDER==__BIG_ENDIAN:defined(__BIG_ENDIAN) 37 __kernel_rwf_t aio_rw_flags; 38 __u32 aio_key; 39 #else 40 #error edit for your odd byteorder . 41 #endif 42 __u16 aio_lio_opcode; 43 __s16 aio_reqprio; 44 __u32 aio_fildes; 45 __u64 aio_buf; 46 __u64 aio_nbytes; 47 __s64 aio_offset; 48 __u64 aio_reserved2; 49 __u32 aio_flags; 50 __u32 aio_resfd; 51 }; 52 #undef IFBIG 53 #undef IFLITTLE 54 #endif 55