|
NAMEaio_fsync —
asynchronous file synchronization (REALTIME)
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <aio.h>
int
DESCRIPTIONTheaio_fsync () system call allows the calling process
to move all modified data associated with the descriptor
iocb->aio_fildes to a permanent storage device. The
call returns immediately after the synchronization request has been enqueued
to the descriptor; the synchronization may or may not have completed at the
time the call returns.
The op argument can be set to
If _POSIX_PRIORITIZED_IO is defined, and the descriptor supports it, then the enqueued operation is submitted at a priority equal to that of the calling process minus iocb->aio_reqprio. The iocb pointer may be subsequently used as
an argument to If the request could not be enqueued (generally due to invalid arguments), the call returns without having enqueued the request. The iocb->aio_sigevent structure can be used to request notification of the operation's completion as described in aio(4). RESTRICTIONSThe Asynchronous I/O Control Block structure pointed to by iocb must remain valid until the operation has completed.The asynchronous I/O control buffer iocb
should be zeroed before the Modification of the Asynchronous I/O Control Block structure is not allowed while the request is queued. RETURN VALUESTheaio_fsync () function returns the value 0 if
successful; otherwise the value -1 is returned and the global variable
errno is set to indicate the error.
ERRORSTheaio_fsync () system call will fail if:
The following conditions may be synchronously detected when the
If the request is successfully enqueued, but subsequently
cancelled or an error occurs, the value returned by the
SEE ALSOaio_cancel(2), aio_error(2), aio_read(2), aio_return(2), aio_suspend(2), aio_waitcomplete(2), aio_write(2), fsync(2), sigevent(3), siginfo(3), aio(4)STANDARDSTheaio_fsync () system call is expected to conform to
the IEEE Std 1003.1 (“POSIX.1”)
standard.
HISTORYTheaio_fsync () system call first appeared in
FreeBSD 7.0. The O_DSYNC
option appeared in FreeBSD 13.0.
Visit the GSP FreeBSD Man Page Interface. |