]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blob - libc/kernel/common/linux/aio_abi.h
auto import from //depot/cupcake/@135843
[android-sdk/platform-bionic.git] / libc / kernel / common / linux / aio_abi.h
1 /****************************************************************************
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __LINUX__AIO_ABI_H
13 #define __LINUX__AIO_ABI_H
15 #include <asm/byteorder.h>
17 typedef unsigned long aio_context_t;
19 enum {
20  IOCB_CMD_PREAD = 0,
21  IOCB_CMD_PWRITE = 1,
22  IOCB_CMD_FSYNC = 2,
23  IOCB_CMD_FDSYNC = 3,
25  IOCB_CMD_NOOP = 6,
26 };
28 struct io_event {
29  __u64 data;
30  __u64 obj;
31  __s64 res;
32  __s64 res2;
33 };
35 #ifdef __LITTLE_ENDIAN
36 #define PADDED(x,y) x, y
37 #elif defined(__BIG_ENDIAN)
38 #define PADDED(x,y) y, x
39 #else
40 #error edit for your odd byteorder.
41 #endif
43 struct iocb {
45  __u64 aio_data;
46  __u32 PADDED(aio_key, aio_reserved1);
48  __u16 aio_lio_opcode;
49  __s16 aio_reqprio;
50  __u32 aio_fildes;
52  __u64 aio_buf;
53  __u64 aio_nbytes;
54  __s64 aio_offset;
56  __u64 aio_reserved2;
57  __u64 aio_reserved3;
58 };
60 #undef IFBIG
61 #undef IFLITTLE
63 #endif