1 /* include/linux/aio_abi.h
3 * Copyright 2000,2001,2002 Red Hat.
7 * Distribute under the terms of the GPLv2 (see ../../COPYING) or under
10 * Permission to use, copy, modify, and distribute this software and its
11 * documentation is hereby granted, provided that the above copyright
12 * notice appears in all copies. This software is provided without any
13 * warranty, express or implied. Red Hat makes no representations about
14 * the suitability of this software for any purpose.
16 * IN NO EVENT SHALL RED HAT BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
17 * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
18 * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF RED HAT HAS BEEN ADVISED
19 * OF THE POSSIBILITY OF SUCH DAMAGE.
21 * RED HAT DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
24 * RED HAT HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
25 * ENHANCEMENTS, OR MODIFICATIONS.
27 #ifndef __LINUX__AIO_ABI_H
28 #define __LINUX__AIO_ABI_H
30 #include <linux/types.h>
32 #include <linux/signal.h>
33 #include <asm/byteorder.h>
35 typedef __kernel_ulong_t aio_context_t;
42 /* 4 was the experimental IOCB_CMD_PREADX */
50 * Valid flags for the "aio_flags" member of the "struct iocb".
52 * IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb"
55 #define IOCB_FLAG_RESFD (1 << 0)
56 #define IOCB_FLAG_IOPRIO (1 << 1)
58 /* read() from /dev/aio returns these structures. */
60 __u64 data; /* the data field from the iocb */
61 __u64 obj; /* what iocb this event came from */
62 __s64 res; /* result code for this event */
63 __s64 res2; /* secondary result */
67 * we always use a 64bit off_t when communicating
68 * with userland. its up to libraries to do the
69 * proper padding and aio_error abstraction
73 /* these are internal to the kernel/libc. */
74 __u64 aio_data; /* data to be returned in event's data */
76 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
77 __u32 aio_key; /* the kernel sets aio_key to the req # */
78 __kernel_rwf_t aio_rw_flags; /* RWF_* flags */
79 #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
80 __kernel_rwf_t aio_rw_flags; /* RWF_* flags */
81 __u32 aio_key; /* the kernel sets aio_key to the req # */
83 #error edit for your odd byteorder.
87 __u16 aio_lio_opcode; /* see IOCB_CMD_ above */
95 /* extra parameters */
96 __u64 aio_reserved2; /* TODO: use this for a (struct sigevent *) */
98 /* flags for the "struct iocb" */
102 * if the IOCB_FLAG_RESFD flag of "aio_flags" is set, this is an
103 * eventfd to signal AIO readiness to
111 struct __aio_sigset {
112 const sigset_t __user *sigmask;
116 #endif /* __LINUX__AIO_ABI_H */