Home | History | Annotate | Download | only in linux
      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
     14 
     15 #include <asm/byteorder.h>
     16 
     17 typedef unsigned long aio_context_t;
     18 
     19 enum {
     20  IOCB_CMD_PREAD = 0,
     21  IOCB_CMD_PWRITE = 1,
     22  IOCB_CMD_FSYNC = 2,
     23  IOCB_CMD_FDSYNC = 3,
     24 
     25  IOCB_CMD_NOOP = 6,
     26 };
     27 
     28 struct io_event {
     29  __u64 data;
     30  __u64 obj;
     31  __s64 res;
     32  __s64 res2;
     33 };
     34 
     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
     42 
     43 struct iocb {
     44 
     45  __u64 aio_data;
     46  __u32 PADDED(aio_key, aio_reserved1);
     47 
     48  __u16 aio_lio_opcode;
     49  __s16 aio_reqprio;
     50  __u32 aio_fildes;
     51 
     52  __u64 aio_buf;
     53  __u64 aio_nbytes;
     54  __s64 aio_offset;
     55 
     56  __u64 aio_reserved2;
     57  __u64 aio_reserved3;
     58 };
     59 
     60 #undef IFBIG
     61 #undef IFLITTLE
     62 
     63 #endif
     64 
     65