The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/posix4/aio.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* XXX Conflicts with John's - not installed.
    2  */
    3 /*-
    4  * Copyright (c) 1996, 1997
    5  *      HD Associates, Inc.  All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. All advertising materials mentioning features or use of this software
   16  *    must display the following acknowledgement:
   17  *      This product includes software developed by HD Associates, Inc
   18  * 4. Neither the name of the author nor the names of any co-contributors
   19  *    may be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE
   26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   32  * SUCH DAMAGE.
   33  *
   34  * $FreeBSD$
   35  */
   36 
   37 /* aio.h: P1003.1B-1993 Asynchronous I/O */
   38 
   39 #ifndef _P1003_1B_AIO_H_
   40 #define _P1003_1B_AIO_H_
   41 
   42 #include <sys/_posix.h>
   43 #include <sys/types.h>
   44 
   45 /* For struct sigevent:
   46  */
   47 #ifdef KERNEL
   48 #include <sys/signal.h>
   49 #else
   50 #include <signal.h>
   51 
   52 #ifdef _P1003_1B_INCLUDE_MAYBES
   53 #include <time.h>
   54 #include <fcntl.h>
   55 #else
   56 struct timespec;
   57 #endif
   58 #endif
   59 
   60 /* Return values: */
   61 
   62 #define AIO_CANCELED            0x01    /* All operations cancelled */
   63 #define AIO_NOTCANCELLED        0x02    /* Some not cancelled */
   64 #define AIO_ALLDONE             0x04    /* None were cancelled */
   65 
   66 /* lio_listio synchronization options */
   67 
   68 #define LIO_WAIT                0x08    /* Suspend until complete */
   69 #define LIO_NOWAIT              0x10    /* Continue operation */
   70 
   71 /* lio_listio element operations */
   72 
   73 #define LIO_READ                0x20
   74 #define LIO_WRITE               0x40
   75 #define LIO_NOP                 0x80
   76 
   77 typedef struct aiocb * const aio_listio_ctl;
   78 typedef const struct aiocb * const caio_listio_ctl;
   79 
   80 struct aiocb {
   81         int             aio_fildes;     /* File descriptor */
   82         off_t           aio_offset;     /* File offset */
   83         volatile void * aio_buf;        /* Location of buffer */
   84         size_t          aio_nbytes;     /* Length of transfer */
   85         int             aio_reqprio;    /* Request priority offset */
   86         struct sigevent aio_sigevent;   /* Signal number and value */
   87         int             aio_lio_opcode; /* Operation to be performed */
   88 };
   89 
   90 #ifndef KERNEL
   91 #include <sys/cdefs.h>
   92 
   93 __BEGIN_DECLS
   94 int aio_read __P((struct aiocb *));
   95 int aio_write __P((struct aiocb *));
   96 
   97 int lio_listio __P((int, aio_listio_ctl[], int, struct sigevent *));
   98 
   99 int aio_error __P((const struct aiocb *));
  100 ssize_t aio_return __P((struct aiocb *));
  101 int aio_cancel __P((int, struct aiocb *));
  102 
  103 int aio_suspend __P((caio_listio_ctl[], int, const struct timespec *));
  104 
  105 int aio_fsync __P((int, struct aiocb *));
  106 __END_DECLS
  107 
  108 #endif /* KERNEL */
  109 
  110 #endif /* _P1003_1B_AIO_H_ */

Cache object: 1bf47e7c050acecca7a5af03d4561bb5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.