20
20
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23
.TH AIO_WRITE 3 2003-11-14 "" "Linux Programmer's Manual"
23
.TH AIO_WRITE 3 2010-10-02 "" "Linux Programmer's Manual"
25
25
aio_write \- asynchronous write
35
function requests an asynchronous "n = write(fd, buf, count)"
36
with fd, buf, count given by
37
.IR aiocbp\->aio_fildes ,
38
.IR aiocbp\->aio_buf ,
39
.IR aiocbp\->aio_nbytes ,
41
The return status n can be retrieved upon completion using
35
function queues the I/O request described by the buffer pointed to by
37
This function is the asynchronous analog of
39
The arguments of the call
43
correspond (in order) to the fields
48
of the structure pointed to by
52
for a description of the
46
58
is not set, the data is written starting at the
47
59
absolute file offset
48
60
.IR aiocbp\->aio_offset ,
49
regardless of the current file position.
61
regardless of the current file offset.
52
is set, the data is written at the end of the file.
53
After this request, the value of the current file position is unspecified.
64
is set, data is written at the end of the file in the same order as
67
After the call, the value of the current file offset is unspecified.
55
69
The "asynchronous" means that this call returns as soon as the
56
70
request has been enqueued; the write may or may not have completed
57
71
when the call returns.
58
72
One tests for completion using
74
The return status of a completed I/O operation can be obtained
76
Asynchronous notification of I/O completion can be obtained by setting
77
.IR aiocbp\->aio_sigevent
62
83
.B _POSIX_PRIORITIZED_IO
109
130
This function is not supported.
134
function is available since glibc 2.1.
110
135
.SH "CONFORMING TO"
136
POSIX.1-2001, POSIX.1-2008.
113
138
It is a good idea to zero out the control block before use.
114
This control block must not be changed while the write operation
139
The control block must not be changed while the write operation
116
141
The buffer area being written out
117
142
.\" or the control block of the operation
118
must not be accessed during the operation or undefined results may
143
must not be accessed during the operation or undefined results may occur.
120
144
The memory areas involved must remain valid.
146
Simultaneous I/O operations specifying the same
148
structure produce undefined results.
122
150
.BR aio_cancel (3),
123
151
.BR aio_error (3),
124
152
.BR aio_fsync (3),
125
153
.BR aio_read (3),
126
154
.BR aio_return (3),
129
This page is part of release 3.27 of the Linux
159
This page is part of release 3.32 of the Linux
132
162
A description of the project,