]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/aio_fsync.3
ld.so.8: srcfix
[thirdparty/man-pages.git] / man3 / aio_fsync.3
CommitLineData
fea681da
MK
1.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2.\"
1dd72f9c 3.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
4.\" This is free documentation; you can redistribute it and/or
5.\" modify it under the terms of the GNU General Public License as
6.\" published by the Free Software Foundation; either version 2 of
7.\" the License, or (at your option) any later version.
8.\"
9.\" The GNU General Public License's references to "object code"
10.\" and "executables" are to be interpreted as the output of any
11.\" document formatting or typesetting system, including
12.\" intermediate and printed output.
13.\"
14.\" This manual is distributed in the hope that it will be useful,
15.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17.\" GNU General Public License for more details.
18.\"
19.\" You should have received a copy of the GNU General Public
c715f741
MK
20.\" License along with this manual; if not, see
21.\" <http://www.gnu.org/licenses/>.
6a8d8745 22.\" %%%LICENSE_END
fea681da 23.\"
4b8c67d9 24.TH AIO_FSYNC 3 2017-09-15 "" "Linux Programmer's Manual"
fea681da
MK
25.SH NAME
26aio_fsync \- asynchronous file synchronization
27.SH SYNOPSIS
fea681da 28.B "#include <aio.h>"
68e4db0a 29.PP
fea681da 30.BI "int aio_fsync(int " op ", struct aiocb *" aiocbp );
68e4db0a 31.PP
0ad25472 32Link with \fI\-lrt\fP.
fea681da
MK
33.SH DESCRIPTION
34The
e511ffb6 35.BR aio_fsync ()
fea681da
MK
36function does a sync on all outstanding asynchronous I/O operations
37associated with
94e9d9fe 38.IR aiocbp\->aio_fildes .
2b014d76
MK
39(See
40.BR aio (7)
41for a description of the
42.I aiocb
43structure.)
dd3568a1 44.PP
fea681da
MK
45More precisely, if
46.I op
2f0af33b
MK
47is
48.BR O_SYNC ,
49then all currently queued I/O operations shall be
fea681da
MK
50completed as if by a call of
51.BR fsync (2),
52and if
53.I op
2f0af33b
MK
54is
55.BR O_DSYNC ,
56this call is the asynchronous analog of
fea681da 57.BR fdatasync (2).
847e0d88 58.PP
46e723d4 59Note that this is a request only; it does not wait for I/O completion.
dd3568a1 60.PP
fea681da 61Apart from
a534e8ba 62.IR aio_fildes ,
fea681da
MK
63the only field in the structure pointed to by
64.I aiocbp
65that is used by this call is the
66.I aio_sigevent
ec856419
MK
67field (a
68.I sigevent
69structure, described in
70.BR sigevent (7)),
71which indicates the desired type of asynchronous notification at completion.
fea681da 72All other fields are ignored.
47297adb 73.SH RETURN VALUE
fea681da 74On success (the sync request was successfully queued)
677f4766 75this function returns 0.
dec985f9 76On error, \-1 is returned, and
fea681da
MK
77.I errno
78is set appropriately.
79.SH ERRORS
80.TP
81.B EAGAIN
82Out of resources.
83.TP
84.B EBADF
85.I aio_fildes
86is not a valid file descriptor open for writing.
87.TP
88.B EINVAL
5e91d9e1 89Synchronized I/O is not supported for this file, or
fea681da 90.I op
2f0af33b
MK
91is not
92.B O_SYNC
93or
94.BR O_DSYNC .
aea038d6
MK
95.TP
96.B ENOSYS
97.BR aio_fsync ()
98is not implemented.
793514ae
MK
99.SH VERSIONS
100The
101.BR aio_fsync ()
102function is available since glibc 2.1.
35099f13
MS
103.SH ATTRIBUTES
104For an explanation of the terms used in this section, see
105.BR attributes (7).
106.TS
107allbox;
108lb lb lb
109l l l.
110Interface Attribute Value
111T{
112.BR aio_fsync ()
113T} Thread safety MT-Safe
114.TE
47297adb 115.SH CONFORMING TO
793514ae 116POSIX.1-2001, POSIX.1-2008.
47297adb 117.SH SEE ALSO
fea681da
MK
118.BR aio_cancel (3),
119.BR aio_error (3),
120.BR aio_read (3),
121.BR aio_return (3),
122.BR aio_suspend (3),
ec856419 123.BR aio_write (3),
cd587df6 124.BR lio_listio (3),
25fa6c3d 125.BR aio (7),
ec856419 126.BR sigevent (7)