source: rtems/cpukit/posix/include/aio.h @ 21242c2

4.115
Last change on this file since 21242c2 was 21242c2, checked in by Joel Sherrill <joel.sherrill@…>, on 06/24/11 at 17:52:58

2011-06-24 Joel Sherrill <joel.sherrill@…>

  • include/rtems/bspIo.h, include/rtems/concat.h, include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h, include/rtems/pci.h, include/rtems/userenv.h, libblock/include/rtems/flashdisk.h, libblock/include/rtems/nvdisk-sram.h, libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h, libcsupport/include/console.h, libcsupport/include/iosupp.h, libcsupport/include/spurious.h, libcsupport/include/motorola/mc68230.h, libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h, libcsupport/include/rtems/framebuffer.h, libcsupport/include/rtems/gxx_wrappers.h, libcsupport/include/rtems/libcsupport.h, libcsupport/include/rtems/libio_.h, libcsupport/include/rtems/malloc.h, libcsupport/include/rtems/termiostypes.h, libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h, libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h, libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h, libmisc/capture/capture-cli.h, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h, libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h, libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h, libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h, libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h, posix/include/mqueue.h, posix/include/semaphore.h, posix/include/rtems/posix/aio_misc.h, posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/posixapi.h, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/sigset.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/priority.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/spinlock.inl, posix/inline/rtems/posix/timer.inl, rtems/mainpage.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/timer.inl, rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h, sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h, score/include/rtems/score/object.h, score/include/rtems/score/priority.h, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl: Add @file Doxygen directives and descriptions to files which originated with RTEMS. This improves the file list page generated by Doxygen.
  • Property mode set to 100644
File size: 3.7 KB
Line 
1/**
2 * @file aio.h
3 *
4 * This file contains the definitions related to POSIX Asynchronous
5 * Input and Output,
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2011.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _AIO_H
20#define _AIO_H
21
22#include <unistd.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#if defined(_POSIX_ASYNCHRONOUS_IO)
29
30/*
31 *  6.7.1 Data Definitions for Asynchronous Input and Output,
32 *        P1003.1b-1993, p. 151
33 */
34
35#include <sys/types.h>
36#include <signal.h>
37#include <time.h>
38#include <fcntl.h>
39
40/*
41 *  6.7.1.2 Manifest Constants, P1003.1b-1993, p. 153
42 */
43
44#define AIO_CANCELED    0 /* all requested operations have been canceled */
45#define AIO_NOTCANCELED 1 /* some of the operations could not be canceled */
46                          /*   since they are in progress */
47#define AIO_ALLDONE     2 /* none of the requested operations could be */
48                          /*   canceled since they are already complete */
49
50/* lio_listio() options */
51
52/*
53 * LIO modes
54 */
55#define LIO_WAIT        0 /* calling process is to suspend until the */
56                          /*   operation is complete */
57#define LIO_NOWAIT      1 /* calling process is to continue execution while */
58                          /*   the operation is performed and no notification */
59                          /*   shall be given when the operation is completed */
60
61/*
62 * LIO opcodes
63 */
64#define LIO_NOP         0 /* no transfer is requested */
65#define LIO_READ        1 /* request a read() */
66#define LIO_WRITE       2 /* request a write() */
67#define LIO_SYNC        3 /* needed by aio_fsync() */
68
69/*
70 *  6.7.1.1 Asynchronous I/O Control Block, P1003.1b-1993, p. 151
71 */
72
73struct aiocb {
74  /* public */
75  int             aio_fildes;     /* File descriptor */
76  off_t           aio_offset;     /* File offset */
77  volatile void  *aio_buf;        /* Location of buffer */
78  size_t          aio_nbytes;     /* Length of transfer */
79  int             aio_reqprio;    /* Request priority offset */
80  struct sigevent aio_sigevent;   /* Signal number and value */
81  int             aio_lio_opcode; /* Operation to be performed */
82  /* private */
83  int             error_code;      /* Used for aio_error() */
84  ssize_t         return_value;     /* Used for aio_return() */
85};
86
87/*
88 *  6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
89 */
90
91int aio_read(
92  struct aiocb  *aiocbp
93);
94
95/*
96 *  6.7.3 Asynchronous Write, P1003.1b-1993, p. 155
97 */
98
99int aio_write(
100  struct aiocb  *aiocbp
101);
102
103/*
104 *  6.7.4 List Directed I/O, P1003.1b-1993, p. 158
105 */
106
107int lio_listio(
108  int                    mode,
109  struct aiocb  * const  list[],
110  int                    nent,
111  struct sigevent       *sig
112);
113
114/*
115 *  6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161
116 */
117
118int aio_error(
119  const struct aiocb  *aiocbp
120);
121
122/*
123 *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
124 *        P1003.1b-1993, p. 162
125 */
126
127ssize_t aio_return(
128  const struct aiocb  *aiocbp
129);
130
131/*
132 *  6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
133 */
134
135int aio_cancel(
136  int            filedes,
137  struct aiocb  *aiocbp
138);
139
140/*
141 *  6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
142 */
143
144int aio_suspend(
145  const struct aiocb  * const   list[],
146  int                     nent,
147  const struct timespec  *timeout
148);
149
150#if defined(_POSIX_SYNCHRONIZED_IO)
151
152/*
153 *  6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166
154 */
155
156int aio_fsync(
157  int            op,
158  struct aiocb  *aiocbp
159);
160
161#endif /* _POSIX_SYNCHRONIZED_IO */
162
163#endif /* _POSIX_ASYNCHRONOUS_IO */
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
170/* end of include file */
Note: See TracBrowser for help on using the repository browser.