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

4.104.114.95
Last change on this file since feaa007 was feaa007, checked in by Joel Sherrill <joel.sherrill@…>, on 12/17/07 at 16:19:14

2007-12-17 Joel Sherrill <joel.sherrill@…>

  • posix/preinstall.am, posix/include/aio.h, posix/include/devctl.h, posix/include/mqueue.h, posix/include/sched.h, posix/include/semaphore.h, posix/include/rtems/posix/cancel.h, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/priority.inl, posix/src/barrierattrdestroy.c, posix/src/barrierattrgetpshared.c, posix/src/barrierattrinit.c, posix/src/barrierattrsetpshared.c, posix/src/cancel.c, posix/src/cancelrun.c, posix/src/cleanuppop.c, posix/src/cleanuppush.c, posix/src/cond.c, posix/src/condattrdestroy.c, posix/src/condattrgetpshared.c, posix/src/condattrinit.c, posix/src/condattrsetpshared.c, posix/src/condbroadcast.c, posix/src/conddefaultattributes.c, posix/src/conddestroy.c, posix/src/condinit.c, posix/src/condsignal.c, posix/src/condsignalsupp.c, posix/src/condwait.c, posix/src/condwaitsupp.c, posix/src/key.c, posix/src/keycreate.c, posix/src/keydelete.c, posix/src/keygetspecific.c, posix/src/keyrundestructors.c, posix/src/keysetspecific.c, posix/src/mqueue.c, posix/src/mqueueclose.c, posix/src/mqueuecreatesupp.c, posix/src/mqueuedeletesupp.c, posix/src/mqueuegetattr.c, posix/src/mqueuenametoid.c, posix/src/mqueuenotify.c, posix/src/mqueueopen.c, posix/src/mqueuereceive.c, posix/src/mqueuerecvsupp.c, posix/src/mqueuesend.c, posix/src/mqueuesendsupp.c, posix/src/mqueuesetattr.c, posix/src/mqueueunlink.c, posix/src/mutex.c, posix/src/mutexattrdestroy.c, posix/src/mutexattrgetprioceiling.c, posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c, posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c, posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c, posix/src/mutexdefaultattributes.c, posix/src/mutexdestroy.c, posix/src/mutexgetprioceiling.c, posix/src/mutexlock.c, posix/src/mutexlocksupp.c, posix/src/mutexsetprioceiling.c, posix/src/mutextrylock.c, posix/src/mutexunlock.c, posix/src/psignal.c, posix/src/psignalchecksignal.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalclearsignals.c, posix/src/psignalsetprocesssignals.c, posix/src/psignalunblockthread.c, posix/src/ptimer.c, posix/src/rwlockattrdestroy.c, posix/src/rwlockattrgetpshared.c, posix/src/rwlockattrinit.c, posix/src/rwlockattrsetpshared.c, posix/src/semaphore.c, posix/src/semaphoredeletesupp.c, posix/src/semaphorenametoid.c, posix/src/semaphorewaitsupp.c, posix/src/semclose.c, posix/src/semdestroy.c, posix/src/semgetvalue.c, posix/src/seminit.c, posix/src/semopen.c, posix/src/sempost.c, posix/src/semtrywait.c, posix/src/semunlink.c, posix/src/semwait.c, posix/src/setcancelstate.c, posix/src/setcanceltype.c, posix/src/sysconf.c, posix/src/testcancel.c: Add missing copyright statements.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/**
2 * @file aio.h
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2007.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef _AIO_H
17#define _AIO_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <unistd.h>
24
25#if defined(_POSIX_ASYNCHRONOUS_IO)
26
27/*
28 *  6.7.1 Data Definitions for Asynchronous Input and Output,
29 *        P1003.1b-1993, p. 151
30 */
31
32#include <sys/types.h>
33#include <signal.h>
34#include <time.h>
35#include <fcntl.h>
36
37/*
38 *  6.7.1.2 Manifest Constants, P1003.1b-1993, p. 153
39 */
40
41#define AIO_CANCELED    0 /* all requested operations have been canceled */
42#define AIO_NOTCANCELED 1 /* some of the operations could not be canceled */
43                          /*   since they are in progress */
44#define AIO_ALLDONE     2 /* none of the requested operations could be */
45                          /*   canceled since they are already complete */
46
47/* lio_listio() options */
48
49#define LIO_WAIT        0 /* calling process is to suspend until the */
50                          /*   operation is complete */
51#define LIO_NOWAIT      1 /* calling process is to continue execution while */
52                          /*   the operation is performed and no notification */
53                          /*   shall be given when the operation is completed */
54#define LIO_READ        2 /* request a read() */
55#define LIO_WRITE       3 /* request a write() */
56#define LIO_NOP         4 /* no transfer is requested */
57
58/*
59 *  6.7.1.1 Asynchronous I/O Control Block, P1003.1b-1993, p. 151
60 */
61
62struct aiocb {
63  int             aio_fildes;     /* File descriptor */
64  off_t           aio_offset;     /* File offset */
65  volatile void  *aio_buf;        /* Location of buffer */
66  size_t          aio_nbytes;     /* Length of transfer */
67  int             aio_reqprio;    /* Request priority offset */
68  struct sigevent aio_sigevent;   /* Signal number and value */
69  int             aio_lio_opcode; /* Operation to be performed */
70};
71
72/*
73 *  6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
74 */
75
76int aio_read(
77  struct aiocb  *aiocbp
78);
79
80/*
81 *  6.7.3 Asynchronous Write, P1003.1b-1993, p. 155
82 */
83
84int aio_write(
85  struct aiocb  *aiocbp
86);
87
88/*
89 *  6.7.4 List Directed I/O, P1003.1b-1993, p. 158
90 */
91
92int lio_listio(
93  int                    mode,
94  struct aiocb  * const  list[],
95  int                    nent,
96  struct sigevent       *sig
97);
98
99/*
100 *  6.7.5 Retrieve Error of Asynchronous I/O Operation, P1003.1b-1993, p. 161
101 */
102
103int aio_error(
104  const struct aiocb  *aiocbp
105);
106
107/*
108 *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
109 *        P1003.1b-1993, p. 162
110 */
111
112int aio_return(
113  const struct aiocb  *aiocbp
114);
115
116/*
117 *  6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
118 */
119
120int aio_cancel(
121  int            filedes,
122  struct aiocb  *aiocbp
123);
124
125/*
126 *  6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
127 */
128
129int aio_suspend(
130  struct aiocb  * const   list[],
131  int                     nent,
132  const struct timespec  *timeout
133);
134
135#if defined(_POSIX_SYNCHRONIZED_IO)
136
137/*
138 *  6.7.9 Asynchronous File Synchronization, P1003.1b-1993, p. 166
139 */
140
141int aio_fsync(
142  int            op,
143  struct aiocb  *aiocbp
144);
145
146#endif /* _POSIX_SYNCHRONIZED_IO */
147
148#endif /* _POSIX_ASYNCHRONOUS_IO */
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif
155/* end of include file */
Note: See TracBrowser for help on using the repository browser.