Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __LINUX__AIO_ABI_H |
| 8 | #define __LINUX__AIO_ABI_H |
| 9 | #include <linux/types.h> |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 10 | #include <linux/fs.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | typedef __kernel_ulong_t aio_context_t; |
| 13 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 14 | IOCB_CMD_PREAD = 0, |
| 15 | IOCB_CMD_PWRITE = 1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 16 | IOCB_CMD_FSYNC = 2, |
| 17 | IOCB_CMD_FDSYNC = 3, |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 18 | IOCB_CMD_POLL = 5, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | IOCB_CMD_NOOP = 6, |
| 20 | IOCB_CMD_PREADV = 7, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 21 | IOCB_CMD_PWRITEV = 8, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | }; |
| 23 | #define IOCB_FLAG_RESFD (1 << 0) |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 24 | #define IOCB_FLAG_IOPRIO (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | struct io_event { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | __u64 data; |
| 27 | __u64 obj; |
| 28 | __s64 res; |
| 29 | __s64 res2; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | }; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 31 | struct iocb { |
| 32 | __u64 aio_data; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 33 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 34 | __u32 aio_key; |
| 35 | __kernel_rwf_t aio_rw_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | #elif defined(__BYTE_ORDER)?__BYTE_ORDER==__BIG_ENDIAN:defined(__BIG_ENDIAN) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 37 | __kernel_rwf_t aio_rw_flags; |
| 38 | __u32 aio_key; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #else |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | #error edit for your odd byteorder . |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 41 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | __u16 aio_lio_opcode; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __s16 aio_reqprio; |
| 44 | __u32 aio_fildes; |
| 45 | __u64 aio_buf; |
| 46 | __u64 aio_nbytes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __s64 aio_offset; |
| 48 | __u64 aio_reserved2; |
| 49 | __u32 aio_flags; |
| 50 | __u32 aio_resfd; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | }; |
| 52 | #undef IFBIG |
| 53 | #undef IFLITTLE |
| 54 | #endif |