Manual Reference Pages - AIO_WRITE (2)
- asynchronous write to a file (REALTIME)
aio_write struct aiocb *iocb
system call allows the calling process to write
from the buffer pointed to by
to the descriptor
The call returns immediately after the write request has been enqueued
to the descriptor; the write may or may not have completed at the time
the call returns.
If the request could not be enqueued, generally due
to invalid arguments, the call returns without having enqueued the
is set for
operations append to the file in the same order as the calls were
is not set for the file descriptor, the write operation will occur at
the absolute position from the beginning of the file plus
is defined, and the descriptor supports it, then the enqueued
operation is submitted at a priority equal to that of the calling
pointer may be subsequently used as an argument to
in order to determine return or error status for the enqueued operation
while it is in progress.
If the request is successfully enqueued, the value of
can be modified during the request as context, so this value must not
be referenced after the request is enqueued.
The Asynchronous I/O Control Block structure pointed to by
and the buffer that the
member of that structure references must remain valid until the
operation has completed.
For this reason, use of auto (stack) variables
for these objects is discouraged.
The asynchronous I/O control buffer
should be zeroed before the
system call to avoid passing bogus context information to the kernel.
Modifications of the Asynchronous I/O Control Block structure or the
buffer contents after the request has been enqueued, but before the
request has completed, are not allowed.
If the file offset in
is past the offset maximum for
no I/O will occur.
.Rv -std aio_write
system call will fail if:
The request was not queued because of system resource limitations.
system call is not supported.
The following conditions may be synchronously detected when the
system call is made, or asynchronously, at any time thereafter.
are detected at call time,
returns -1 and sets
appropriately; otherwise the
system call must be called, and will return -1, and
must be called to determine the actual value that would have been
is invalid, or is not opened for writing.
is not valid, the priority specified by
is not a valid priority, or the number of bytes specified by
is not valid.
If the request is successfully enqueued, but subsequently canceled
or an error occurs, the value returned by the
system call is per the
system call, and the value returned by the
system call is either one of the error returns from the
system call, or one of:
is invalid for writing.
The request was explicitly canceled via a call to
would be invalid.
is expected to conform to the
system call first appeared in
.Fx 3.0 .
This manual page was written by
.An Wes Peters Aq email@example.com .
Invalid information in
may confuse the kernel.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.