]>
Commit | Line | Data |
---|---|---|
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 |
8 | aio_fsync \- asynchronous file synchronization | |
a42212d0 AC |
9 | .SH LIBRARY |
10 | Real-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 |
19 | The | |
e511ffb6 | 20 | .BR aio_fsync () |
fea681da MK |
21 | function does a sync on all outstanding asynchronous I/O operations |
22 | associated with | |
94e9d9fe | 23 | .IR aiocbp\->aio_fildes . |
2b014d76 MK |
24 | (See |
25 | .BR aio (7) | |
26 | for a description of the | |
27 | .I aiocb | |
28 | structure.) | |
c6d039a3 | 29 | .P |
fea681da MK |
30 | More precisely, if |
31 | .I op | |
2f0af33b MK |
32 | is |
33 | .BR O_SYNC , | |
34 | then all currently queued I/O operations shall be | |
fea681da MK |
35 | completed as if by a call of |
36 | .BR fsync (2), | |
37 | and if | |
38 | .I op | |
2f0af33b MK |
39 | is |
40 | .BR O_DSYNC , | |
41 | this call is the asynchronous analog of | |
fea681da | 42 | .BR fdatasync (2). |
c6d039a3 | 43 | .P |
46e723d4 | 44 | Note that this is a request only; it does not wait for I/O completion. |
c6d039a3 | 45 | .P |
fea681da | 46 | Apart from |
a534e8ba | 47 | .IR aio_fildes , |
fea681da MK |
48 | the only field in the structure pointed to by |
49 | .I aiocbp | |
50 | that is used by this call is the | |
51 | .I aio_sigevent | |
ec856419 MK |
52 | field (a |
53 | .I sigevent | |
54 | structure, described in | |
5b98e0e7 | 55 | .BR sigevent (3type)), |
ec856419 | 56 | which indicates the desired type of asynchronous notification at completion. |
fea681da | 57 | All other fields are ignored. |
47297adb | 58 | .SH RETURN VALUE |
fea681da | 59 | On success (the sync request was successfully queued) |
677f4766 | 60 | this function returns 0. |
dec985f9 | 61 | On error, \-1 is returned, and |
fea681da | 62 | .I errno |
f6a4078b | 63 | is set to indicate the error. |
fea681da MK |
64 | .SH ERRORS |
65 | .TP | |
66 | .B EAGAIN | |
67 | Out of resources. | |
68 | .TP | |
69 | .B EBADF | |
70 | .I aio_fildes | |
71 | is not a valid file descriptor open for writing. | |
72 | .TP | |
73 | .B EINVAL | |
5e91d9e1 | 74 | Synchronized I/O is not supported for this file, or |
fea681da | 75 | .I op |
2f0af33b MK |
76 | is not |
77 | .B O_SYNC | |
78 | or | |
79 | .BR O_DSYNC . | |
aea038d6 MK |
80 | .TP |
81 | .B ENOSYS | |
82 | .BR aio_fsync () | |
83 | is not implemented. | |
35099f13 MS |
84 | .SH ATTRIBUTES |
85 | For an explanation of the terms used in this section, see | |
86 | .BR attributes (7). | |
87 | .TS | |
88 | allbox; | |
c466875e | 89 | lbx lb lb |
35099f13 MS |
90 | l l l. |
91 | Interface Attribute Value | |
92 | T{ | |
9e54434e BR |
93 | .na |
94 | .nh | |
35099f13 MS |
95 | .BR aio_fsync () |
96 | T} Thread safety MT-Safe | |
97 | .TE | |
3113c7f3 | 98 | .SH STANDARDS |
4131356c AC |
99 | POSIX.1-2008. |
100 | .SH HISTORY | |
101 | glibc 2.1. | |
102 | POSIX.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) |