~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/aio_abi.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* include/linux/aio_abi.h
  2  *
  3  * Copyright 2000,2001,2002 Red Hat.
  4  *
  5  * Written by Benjamin LaHaise <bcrl@kvack.org>
  6  *
  7  * Distribute under the terms of the GPLv2 (see ../../COPYING) or under 
  8  * the following terms.
  9  *
 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.
 15  *
 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.
 20  *
 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.
 26  */
 27 #ifndef __LINUX__AIO_ABI_H
 28 #define __LINUX__AIO_ABI_H
 29 
 30 #include <linux/types.h>
 31 #include <linux/fs.h>
 32 #include <asm/byteorder.h>
 33 
 34 typedef __kernel_ulong_t aio_context_t;
 35 
 36 enum {
 37         IOCB_CMD_PREAD = 0,
 38         IOCB_CMD_PWRITE = 1,
 39         IOCB_CMD_FSYNC = 2,
 40         IOCB_CMD_FDSYNC = 3,
 41         /* 4 was the experimental IOCB_CMD_PREADX */
 42         IOCB_CMD_POLL = 5,
 43         IOCB_CMD_NOOP = 6,
 44         IOCB_CMD_PREADV = 7,
 45         IOCB_CMD_PWRITEV = 8,
 46 };
 47 
 48 /*
 49  * Valid flags for the "aio_flags" member of the "struct iocb".
 50  *
 51  * IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb"
 52  *                   is valid.
 53  * IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb"
 54  *                    is valid.
 55  */
 56 #define IOCB_FLAG_RESFD         (1 << 0)
 57 #define IOCB_FLAG_IOPRIO        (1 << 1)
 58 
 59 /* read() from /dev/aio returns these structures. */
 60 struct io_event {
 61         __u64           data;           /* the data field from the iocb */
 62         __u64           obj;            /* what iocb this event came from */
 63         __s64           res;            /* result code for this event */
 64         __s64           res2;           /* secondary result */
 65 };
 66 
 67 /*
 68  * we always use a 64bit off_t when communicating
 69  * with userland.  its up to libraries to do the
 70  * proper padding and aio_error abstraction
 71  */
 72 
 73 struct iocb {
 74         /* these are internal to the kernel/libc. */
 75         __u64   aio_data;       /* data to be returned in event's data */
 76 
 77 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
 78         __u32   aio_key;        /* the kernel sets aio_key to the req # */
 79         __kernel_rwf_t aio_rw_flags;    /* RWF_* flags */
 80 #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
 81         __kernel_rwf_t aio_rw_flags;    /* RWF_* flags */
 82         __u32   aio_key;        /* the kernel sets aio_key to the req # */
 83 #else
 84 #error edit for your odd byteorder.
 85 #endif
 86 
 87         /* common fields */
 88         __u16   aio_lio_opcode; /* see IOCB_CMD_ above */
 89         __s16   aio_reqprio;
 90         __u32   aio_fildes;
 91 
 92         __u64   aio_buf;
 93         __u64   aio_nbytes;
 94         __s64   aio_offset;
 95 
 96         /* extra parameters */
 97         __u64   aio_reserved2;  /* TODO: use this for a (struct sigevent *) */
 98 
 99         /* flags for the "struct iocb" */
100         __u32   aio_flags;
101 
102         /*
103          * if the IOCB_FLAG_RESFD flag of "aio_flags" is set, this is an
104          * eventfd to signal AIO readiness to
105          */
106         __u32   aio_resfd;
107 }; /* 64 bytes */
108 
109 #undef IFBIG
110 #undef IFLITTLE
111 
112 #endif /* __LINUX__AIO_ABI_H */
113 
114 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php