]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man/man3/aio_fsync.3
man/, share/mk/: Move man*/ to man/
[thirdparty/man-pages.git] / man / man3 / aio_fsync.3
CommitLineData
a1eaacb1 1'\" t
fea681da
MK
2.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3.\"
e4a74ca8 4.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da 5.\"
4c1c5274 6.TH aio_fsync 3 (date) "Linux man-pages (unreleased)"
fea681da
MK
7.SH NAME
8aio_fsync \- asynchronous file synchronization
a42212d0
AC
9.SH LIBRARY
10Real-time library
8fc3b2cf 11.RI ( librt ", " \-lrt )
fea681da 12.SH SYNOPSIS
c7db92b9 13.nf
fea681da 14.B "#include <aio.h>"
c6d039a3 15.P
fea681da 16.BI "int aio_fsync(int " op ", struct aiocb *" aiocbp );
c7db92b9 17.fi
fea681da
MK
18.SH DESCRIPTION
19The
e511ffb6 20.BR aio_fsync ()
fea681da
MK
21function does a sync on all outstanding asynchronous I/O operations
22associated with
94e9d9fe 23.IR aiocbp\->aio_fildes .
2b014d76
MK
24(See
25.BR aio (7)
26for a description of the
27.I aiocb
28structure.)
c6d039a3 29.P
fea681da
MK
30More precisely, if
31.I op
2f0af33b
MK
32is
33.BR O_SYNC ,
34then all currently queued I/O operations shall be
fea681da
MK
35completed as if by a call of
36.BR fsync (2),
37and if
38.I op
2f0af33b
MK
39is
40.BR O_DSYNC ,
41this call is the asynchronous analog of
fea681da 42.BR fdatasync (2).
c6d039a3 43.P
46e723d4 44Note that this is a request only; it does not wait for I/O completion.
c6d039a3 45.P
fea681da 46Apart from
a534e8ba 47.IR aio_fildes ,
fea681da
MK
48the only field in the structure pointed to by
49.I aiocbp
50that is used by this call is the
51.I aio_sigevent
ec856419
MK
52field (a
53.I sigevent
54structure, described in
5b98e0e7 55.BR sigevent (3type)),
ec856419 56which indicates the desired type of asynchronous notification at completion.
fea681da 57All other fields are ignored.
47297adb 58.SH RETURN VALUE
fea681da 59On success (the sync request was successfully queued)
677f4766 60this function returns 0.
dec985f9 61On error, \-1 is returned, and
fea681da 62.I errno
f6a4078b 63is set to indicate the error.
fea681da
MK
64.SH ERRORS
65.TP
66.B EAGAIN
67Out of resources.
68.TP
69.B EBADF
70.I aio_fildes
71is not a valid file descriptor open for writing.
72.TP
73.B EINVAL
5e91d9e1 74Synchronized I/O is not supported for this file, or
fea681da 75.I op
2f0af33b
MK
76is not
77.B O_SYNC
78or
79.BR O_DSYNC .
aea038d6
MK
80.TP
81.B ENOSYS
82.BR aio_fsync ()
83is not implemented.
35099f13
MS
84.SH ATTRIBUTES
85For an explanation of the terms used in this section, see
86.BR attributes (7).
87.TS
88allbox;
c466875e 89lbx lb lb
35099f13
MS
90l l l.
91Interface Attribute Value
92T{
9e54434e
BR
93.na
94.nh
35099f13
MS
95.BR aio_fsync ()
96T} Thread safety MT-Safe
97.TE
3113c7f3 98.SH STANDARDS
4131356c
AC
99POSIX.1-2008.
100.SH HISTORY
101glibc 2.1.
102POSIX.1-2001.
47297adb 103.SH SEE ALSO
fea681da
MK
104.BR aio_cancel (3),
105.BR aio_error (3),
106.BR aio_read (3),
107.BR aio_return (3),
108.BR aio_suspend (3),
ec856419 109.BR aio_write (3),
cd587df6 110.BR lio_listio (3),
25fa6c3d 111.BR aio (7),
5b98e0e7 112.BR sigevent (3type)