• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef __LINUX__AIO_ABI_H
7 #define __LINUX__AIO_ABI_H
8 #include <linux/types.h>
9 #include <linux/fs.h>
10 #include <asm/byteorder.h>
11 typedef __kernel_ulong_t aio_context_t;
12 enum {
13 	IOCB_CMD_PREAD = 0,
14 	IOCB_CMD_PWRITE = 1,
15 	IOCB_CMD_FSYNC = 2,
16 	IOCB_CMD_FDSYNC = 3,
17 
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 
33 	__u64	aio_data;
34 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
35 	__u32	aio_key;
36 	__kernel_rwf_t aio_rw_flags;
37 #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
38 	__kernel_rwf_t aio_rw_flags;
39 	__u32	aio_key;
40 #else
41 #error edit for your odd byteorder.
42 #endif
43 
44 	__u16	aio_lio_opcode;
45 	__s16	aio_reqprio;
46 	__u32	aio_fildes;
47 	__u64	aio_buf;
48 	__u64	aio_nbytes;
49 	__s64	aio_offset;
50 
51 	__u64	aio_reserved2;
52 
53 	__u32	aio_flags;
54 
55 	__u32	aio_resfd;
56 };
57 #undef IFBIG
58 #undef IFLITTLE
59 #endif
60