diff options
Diffstat (limited to 'man-pages-posix-2003/man3p/aio_fsync.3p')
-rw-r--r-- | man-pages-posix-2003/man3p/aio_fsync.3p | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/man-pages-posix-2003/man3p/aio_fsync.3p b/man-pages-posix-2003/man3p/aio_fsync.3p new file mode 100644 index 0000000..4e78c41 --- /dev/null +++ b/man-pages-posix-2003/man3p/aio_fsync.3p @@ -0,0 +1,133 @@ +.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved +.TH "AIO_FSYNC" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" +.\" aio_fsync +.SH PROLOG +This manual page is part of the POSIX Programmer's Manual. +The Linux implementation of this interface may differ (consult +the corresponding Linux manual page for details of Linux behavior), +or the interface may not be implemented on Linux. +.SH NAME +aio_fsync \- asynchronous file synchronization (\fBREALTIME\fP) +.SH SYNOPSIS +.LP +\fB#include <aio.h> +.br +.sp +int aio_fsync(int\fP \fIop\fP\fB, struct aiocb *\fP\fIaiocbp\fP\fB); +\fP +\fB +.br +\fP +.SH DESCRIPTION +.LP +The \fIaio_fsync\fP() function shall asynchronously force all I/O +operations associated with the file indicated by the file +descriptor \fIaio_fildes\fP member of the \fBaiocb\fP structure referenced +by the \fIaiocbp\fP argument and queued at the time +of the call to \fIaio_fsync\fP() to the synchronized I/O completion +state. The function call shall return when the synchronization +request has been initiated or queued to the file or device (even when +the data cannot be synchronized immediately). +.LP +If \fIop\fP is O_DSYNC, all currently queued I/O operations shall +be completed as if by a call to \fIfdatasync\fP(); that is, as defined +for synchronized I/O data integrity completion. If +\fIop\fP is O_SYNC, all currently queued I/O operations shall be completed +as if by a call to \fIfsync\fP(); that is, as defined for synchronized +I/O file integrity completion. If the +\fIaio_fsync\fP() function fails, or if the operation queued by \fIaio_fsync\fP() +fails, then, as for \fIfsync\fP() and \fIfdatasync\fP(), outstanding +I/O +operations are not guaranteed to have been completed. +.LP +If \fIaio_fsync\fP() succeeds, then it is only the I/O that was queued +at the time of the call to \fIaio_fsync\fP() that is +guaranteed to be forced to the relevant completion state. The completion +of subsequent I/O on the file descriptor is not guaranteed +to be completed in a synchronized fashion. +.LP +The \fIaiocbp\fP argument refers to an asynchronous I/O control block. +The \fIaiocbp\fP value may be used as an argument to \fIaio_error\fP() +and \fIaio_return\fP() in +order to determine the error status and return status, respectively, +of the asynchronous operation while it is proceeding. When the +request is queued, the error status for the operation is [EINPROGRESS]. +When all data has been successfully transferred, the error +status shall be reset to reflect the success or failure of the operation. +If the operation does not complete successfully, the +error status for the operation shall be set to indicate the error. +The \fIaio_sigevent\fP member determines the asynchronous +notification to occur as specified in \fISignal Generation and Delivery\fP +when all +operations have achieved synchronized I/O completion. All other members +of the structure referenced by \fIaiocbp\fP are ignored. +If the control block referenced by \fIaiocbp\fP becomes an illegal +address prior to asynchronous I/O completion, then the behavior +is undefined. +.LP +If the \fIaio_fsync\fP() function fails or \fIaiocbp\fP indicates +an error condition, data is not guaranteed to have been +successfully transferred. +.SH RETURN VALUE +.LP +The \fIaio_fsync\fP() function shall return the value 0 to the calling +process if the I/O operation is successfully queued; +otherwise, the function shall return the value -1 and set \fIerrno\fP +to indicate the error. +.SH ERRORS +.LP +The \fIaio_fsync\fP() function shall fail if: +.TP 7 +.B EAGAIN +The requested asynchronous operation was not queued due to temporary +resource limitations. +.TP 7 +.B EBADF +The \fIaio_fildes\fP member of the \fBaiocb\fP structure referenced +by the \fIaiocbp\fP argument is not a valid file +descriptor open for writing. +.TP 7 +.B EINVAL +This implementation does not support synchronized I/O for this file. +.TP 7 +.B EINVAL +A value of \fIop\fP other than O_DSYNC or O_SYNC was specified. +.sp +.LP +In the event that any of the queued I/O operations fail, \fIaio_fsync\fP() +shall return the error condition defined for \fIread\fP() and \fIwrite\fP(). +The error is returned in +the error status for the asynchronous \fIfsync\fP() operation, which +can be retrieved using +\fIaio_error\fP(). +.LP +\fIThe following sections are informative.\fP +.SH EXAMPLES +.LP +None. +.SH APPLICATION USAGE +.LP +The \fIaio_fsync\fP() function is part of the Asynchronous Input and +Output option and need not be available on all +implementations. +.SH RATIONALE +.LP +None. +.SH FUTURE DIRECTIONS +.LP +None. +.SH SEE ALSO +.LP +\fIfcntl\fP(), \fIfdatasync\fP(), \fIfsync\fP(), \fIopen\fP(), +\fIread\fP(), \fIwrite\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001, +\fI<aio.h>\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 . |