source: rtems/cpukit/posix/include/aio.h @ f4719d5a

4.104.114.84.95
Last change on this file since f4719d5a was eb5a7e07, checked in by Joel Sherrill <joel.sherrill@…>, on 10/06/95 at 20:48:38

fixed missing CVS IDs

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/* aio.h
2 *
3 *  $Id$
4 */
5
6#ifndef __POSIX_ASYNCHRONOUS_IO_h
7#define __POSIX_ASYNCHRONOUS_IO_h
8
9#include <rtems/posix/features.h>
10
11#if defined(_POSIX_ASYNCHRONOUS_IO)
12
13/*
14 *  6.7.1 Data Definitions for Asynchronous Input and Output,
15 *        P1003.1b-1993, p. 151
16 */
17
18#include <sys/types.h>
19#include <signal.h>
20#include <time.h>
21#include <fcntl.h>
22
23/*
24 *  6.7.1.2 Manifest Constants, P1003.1b-1993, p. 153
25 */
26
27#define AIO_CANCELED    0 /* all requested operations have been canceled */
28#define AIO_NOTCANCELED 0 /* some of the operations could not be canceled */
29                          /*   since they are in progress */
30#define AIO_ALLDONE     0 /* none of the requested operations could be */
31                          /*   canceled since they are already complete */
32
33/* lio_listio() options */
34
35#define LIO_WAIT        0 /* calling process is to suspend until the */
36                          /*   operation is complete */
37#define LIO_NOWAIT      0 /* calling process is to continue execution while */
38                          /*   the operation is performed and no notification */
39                          /*   shall be given when the operation is completed */
40#define LIO_READ        0 /* request a read() */
41#define LIO_WRITE       0 /* request a write() */
42#define LIO_NOP         0 /* no transfer is requested */
43
44/*
45 *  6.7.1.1 Asynchronous I/O Control Block, P1003.1b-1993, p. 151
46 */
47
48struct aiocb {
49  int             aio_fildes;     /* File descriptor */
50  off_t           aio_offset;     /* File offset */
51  volatile void  *aio_buf;        /* Location of buffer */
52  size_t          aio_nbytes;     /* Length of transfer */
53  int             aio_reqprio;    /* Request priority offset */
54  struct sigevent aio_sigevent;   /* Signal number and value */
55  int             aoi_lio_opcode; /* Operation to be performed */
56};
57
58/*
59 *  6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
60 */
61
62int aio_read(
63  struct aiocb  *aiocbp
64);
65
66/*
67 *  6.7.3 Asynchronous Write, P1003.1b-1993, p. 155
68 */
69
70int aio_write(
71  struct aiocb  *aiocbp
72);
73
74/*
75 *  6.7.4 List Directed I/O, P1003.1b-1993, p. 158
76 */
77
78int lio_listio(
79  int                    mode,
80  struct aiocb  * const  list[],
81  int                    nent,
82  struct sigevent       *sig
83);
84
85/*
86 *  6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161
87 */
88
89int aio_error(
90  const struct aiocb  *aiocbp
91);
92
93/*
94 *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
95 *        P1003.1b-1993, p. 162
96 */
97
98int aio_return(
99  const struct aiocb  *aiocbp
100);
101
102/*
103 *  6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
104 */
105
106int aio_cancel(
107  int            filedes,
108  struct aiocb  *aiocbp
109);
110
111/*
112 *  6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
113 */
114
115int aio_suspend(
116  struct aiocb  * const   list[],
117  int                     nent,
118  const struct timespec  *timeout
119);
120
121#if defined(_POSIX_SYNCHRONIZED_IO)
122
123/*
124 *  6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166
125 */
126
127int aio_fsync(
128  int            op,
129  struct aiocb  *aiocbp
130);
131
132#endif /* _POSIX_SYNCHRONIZED_IO */
133
134#endif /* _POSIX_ASYNCHRONOUS_IO */
135
136#endif
137/* end of include file */
Note: See TracBrowser for help on using the repository browser.