summaryrefslogtreecommitdiffstats
path: root/man0p/aio.h.0p
blob: 828cb0aff482842b9d2289d5017b2fd5aaa80013 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "<aio.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" <aio.h> 
.SH NAME
aio.h \- asynchronous input and output (\fBREALTIME\fP)
.SH SYNOPSIS
.LP
\fB#include <aio.h> \fP
.SH DESCRIPTION
.LP
The \fI<aio.h>\fP header shall define the \fBaiocb\fP structure which
shall include at least the following members:
.sp
.RS
.nf

\fBint             aio_fildes    \fP File descriptor. \fB
off_t           aio_offset    \fP File offset. \fB
volatile void  *aio_buf       \fP Location of buffer. \fB
size_t          aio_nbytes    \fP Length of transfer. \fB
int             aio_reqprio   \fP Request priority offset. \fB
struct sigevent aio_sigevent  \fP Signal number and value. \fB
int             aio_lio_opcode\fP Operation to be performed. \fB
\fP
.fi
.RE
.LP
This header shall also include the following constants:
.TP 7
AIO_ALLDONE
A return value indicating that none of the requested operations could
be canceled since they are already complete.
.TP 7
AIO_CANCELED
A return value indicating that all requested operations have been
canceled.
.TP 7
AIO_NOTCANCELED
.sp
A return value indicating that some of the requested operations could
not be canceled since they are in progress.
.TP 7
LIO_NOP
A \fIlio_listio\fP() element operation option indicating that no transfer
is
requested.
.TP 7
LIO_NOWAIT
A \fIlio_listio\fP() synchronization operation indicating that the
calling thread
is to continue execution while the \fIlio_listio\fP() operation is
being performed, and
no notification is given when the operation is complete.
.TP 7
LIO_READ
A \fIlio_listio\fP() element operation option requesting a read.
.TP 7
LIO_WAIT
A \fIlio_listio\fP() synchronization operation indicating that the
calling thread
is to suspend until the \fIlio_listio\fP() operation is complete.
.TP 7
LIO_WRITE
A \fIlio_listio\fP() element operation option requesting a write.
.sp
.LP
The following shall be declared as functions and may also be defined
as macros. Function prototypes shall be provided.
.sp
.RS
.nf

\fBint      aio_cancel(int, struct aiocb *);
int      aio_error(const struct aiocb *);
int      aio_fsync(int, struct aiocb *);
int      aio_read(struct aiocb *);
ssize_t  aio_return(struct aiocb *);
int      aio_suspend(const struct aiocb *const[], int,
             const struct timespec *);
int      aio_write(struct aiocb *);
int      lio_listio(int, struct aiocb *restrict const[restrict], int,
             struct sigevent *restrict);
\fP
.fi
.RE
.LP
Inclusion of the \fI<aio.h>\fP header may make visible symbols defined
in the headers \fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
and \fI<time.h>\fP.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fI<fcntl.h>\fP , \fI<signal.h>\fP , \fI<sys/types.h>\fP , \fI<time.h>\fP
, the System Interfaces volume
of IEEE\ Std\ 1003.1-2001, \fIfsync\fP(), \fIlseek\fP(), \fIread\fP(),
\fIwrite\fP()
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .