blob: c92bc8f11be4d6ec36d9f4a9e6164ea832cfc81e [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <asm/byteorder.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017typedef unsigned long aio_context_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080018
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019enum {
20 IOCB_CMD_PREAD = 0,
21 IOCB_CMD_PWRITE = 1,
22 IOCB_CMD_FSYNC = 2,
23 IOCB_CMD_FDSYNC = 3,
Ben Cheng4b29af02012-03-07 16:14:53 -080024
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025 IOCB_CMD_NOOP = 6,
26};
Ben Cheng4b29af02012-03-07 16:14:53 -080027
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080028struct io_event {
29 __u64 data;
30 __u64 obj;
31 __s64 res;
32 __s64 res2;
33};
Ben Cheng4b29af02012-03-07 16:14:53 -080034
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035#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
Ben Cheng4b29af02012-03-07 16:14:53 -080042
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080043struct iocb {
Ben Cheng4b29af02012-03-07 16:14:53 -080044
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080045 __u64 aio_data;
46 __u32 PADDED(aio_key, aio_reserved1);
Ben Cheng4b29af02012-03-07 16:14:53 -080047
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080048 __u16 aio_lio_opcode;
49 __s16 aio_reqprio;
50 __u32 aio_fildes;
Ben Cheng4b29af02012-03-07 16:14:53 -080051
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080052 __u64 aio_buf;
53 __u64 aio_nbytes;
54 __s64 aio_offset;
Ben Cheng4b29af02012-03-07 16:14:53 -080055
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080056 __u64 aio_reserved2;
57 __u64 aio_reserved3;
58};
Ben Cheng4b29af02012-03-07 16:14:53 -080059
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060#undef IFBIG
61#undef IFLITTLE
Ben Cheng4b29af02012-03-07 16:14:53 -080062
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080063#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080064