source: rtems/cpukit/posix/include/aio.h @ 5e9b32b

4.104.114.84.95
Last change on this file since 5e9b32b was 5e9b32b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/95 at 19:27:15

posix support initially added

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