blob: e71936d60a74d704be2754e8a370abe14e96941f [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __LINUX__AIO_ABI_H
20#define __LINUX__AIO_ABI_H
21#include <linux/types.h>
Christopher Ferris1308ad32017-11-14 17:32:13 -080022#include <linux/fs.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#include <asm/byteorder.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070024typedef __kernel_ulong_t aio_context_t;
25enum {
Tao Baod7db5942015-01-28 10:07:51 -080026 IOCB_CMD_PREAD = 0,
27 IOCB_CMD_PWRITE = 1,
Tao Baod7db5942015-01-28 10:07:51 -080028 IOCB_CMD_FSYNC = 2,
29 IOCB_CMD_FDSYNC = 3,
30 IOCB_CMD_NOOP = 6,
31 IOCB_CMD_PREADV = 7,
Tao Baod7db5942015-01-28 10:07:51 -080032 IOCB_CMD_PWRITEV = 8,
Ben Cheng655a7c02013-10-16 16:09:24 -070033};
34#define IOCB_FLAG_RESFD (1 << 0)
35struct io_event {
Tao Baod7db5942015-01-28 10:07:51 -080036 __u64 data;
37 __u64 obj;
38 __s64 res;
39 __s64 res2;
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
Christopher Ferris1308ad32017-11-14 17:32:13 -080041struct iocb {
42 __u64 aio_data;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080043#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
Christopher Ferris1308ad32017-11-14 17:32:13 -080044 __u32 aio_key;
45 __kernel_rwf_t aio_rw_flags;
Tao Baod7db5942015-01-28 10:07:51 -080046#elif defined(__BYTE_ORDER)?__BYTE_ORDER==__BIG_ENDIAN:defined(__BIG_ENDIAN)
Christopher Ferris1308ad32017-11-14 17:32:13 -080047 __kernel_rwf_t aio_rw_flags;
48 __u32 aio_key;
Ben Cheng655a7c02013-10-16 16:09:24 -070049#else
Tao Baod7db5942015-01-28 10:07:51 -080050#error edit for your odd byteorder .
Ben Cheng655a7c02013-10-16 16:09:24 -070051#endif
Tao Baod7db5942015-01-28 10:07:51 -080052 __u16 aio_lio_opcode;
Tao Baod7db5942015-01-28 10:07:51 -080053 __s16 aio_reqprio;
54 __u32 aio_fildes;
55 __u64 aio_buf;
56 __u64 aio_nbytes;
Tao Baod7db5942015-01-28 10:07:51 -080057 __s64 aio_offset;
58 __u64 aio_reserved2;
59 __u32 aio_flags;
60 __u32 aio_resfd;
Ben Cheng655a7c02013-10-16 16:09:24 -070061};
62#undef IFBIG
63#undef IFLITTLE
64#endif