]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/aio_fsync.3
ffix
[thirdparty/man-pages.git] / man3 / aio_fsync.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21 .\" USA.
22 .\"
23 .TH AIO_FSYNC 3 2003-11-14 "" "Linux Programmer's Manual"
24 .SH NAME
25 aio_fsync \- asynchronous file synchronization
26 .SH SYNOPSIS
27 .sp
28 .B "#include <aio.h>"
29 .sp
30 .BI "int aio_fsync(int " op ", struct aiocb *" aiocbp );
31 .SH DESCRIPTION
32 The
33 .BR aio_fsync ()
34 function does a sync on all outstanding asynchronous I/O operations
35 associated with
36 .IR aiocbp->aio_fildes .
37 .LP
38 More precisely, if
39 .I op
40 is
41 .BR O_SYNC ,
42 then all currently queued I/O operations shall be
43 completed as if by a call of
44 .BR fsync (2),
45 and if
46 .I op
47 is
48 .BR O_DSYNC ,
49 this call is the asynchronous analog of
50 .BR fdatasync (2).
51 Note that this is a request only \(em this call does not wait
52 for I/O completion.
53 .LP
54 Apart from
55 .I aio_fildes
56 the only field in the structure pointed to by
57 .I aiocbp
58 that is used by this call is the
59 .I aio_sigevent
60 field (a \fIstruct sigevent\fP) that indicates the desired type of
61 asynchronous notification at completion.
62 All other fields are ignored.
63 .SH "RETURN VALUE"
64 On success (the sync request was successfully queued)
65 this function returns 0.
66 On error \-1 is returned, and
67 .I errno
68 is set appropriately.
69 .SH ERRORS
70 .TP
71 .B EAGAIN
72 Out of resources.
73 .TP
74 .B EBADF
75 .I aio_fildes
76 is not a valid file descriptor open for writing.
77 .TP
78 .B EINVAL
79 No synchronized I/O for this file is supported, or
80 .I op
81 is not
82 .B O_SYNC
83 or
84 .BR O_DSYNC .
85 .SH "CONFORMING TO"
86 POSIX.1-2001
87 .SH "SEE ALSO"
88 .BR aio_cancel (3),
89 .BR aio_error (3),
90 .BR aio_read (3),
91 .BR aio_return (3),
92 .BR aio_suspend (3),
93 .BR aio_write (3)