]>
Commit | Line | Data |
---|---|---|
fea681da MK |
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 | .sp | |
32 | .SH DESCRIPTION | |
33 | The | |
34 | .B aio_fsync | |
35 | function does a sync on all outstanding asynchronous I/O operations | |
36 | associated with | |
37 | .IR aiocbp->aio_fildes . | |
38 | .LP | |
39 | More precisely, if | |
40 | .I op | |
41 | is O_SYNC, then all currently queued I/O operations shall be | |
42 | completed as if by a call of | |
43 | .BR fsync (2), | |
44 | and if | |
45 | .I op | |
46 | is O_DSYNC, this call is the asynchronous analog of | |
47 | .BR fdatasync (2). | |
df8a3cac | 48 | Note that this is a request only \(em this call does not wait |
fea681da MK |
49 | for I/O completion. |
50 | .LP | |
51 | Apart from | |
52 | .I aio_fildes | |
53 | the only field in the structure pointed to by | |
54 | .I aiocbp | |
55 | that is used by this call is the | |
56 | .I aio_sigevent | |
57 | field (a struct sigevent) that indicates the desired type of | |
58 | asynchronous notification at completion. | |
59 | All other fields are ignored. | |
60 | .SH "RETURN VALUE" | |
61 | On success (the sync request was successfully queued) | |
62 | this function returns 0. On error \-1 is returned, and | |
63 | .I errno | |
64 | is set appropriately. | |
65 | .SH ERRORS | |
66 | .TP | |
67 | .B EAGAIN | |
68 | Out of resources. | |
69 | .TP | |
70 | .B EBADF | |
71 | .I aio_fildes | |
72 | is not a valid file descriptor open for writing. | |
73 | .TP | |
74 | .B EINVAL | |
75 | No synchronized I/O for this file is supported, or | |
76 | .I op | |
77 | is not O_SYNC or O_DSYNC. | |
78 | .SH "CONFORMING TO" | |
79 | POSIX 1003.1-2003 | |
80 | .SH "SEE ALSO" | |
81 | .BR aio_cancel (3), | |
82 | .BR aio_error (3), | |
83 | .BR aio_read (3), | |
84 | .BR aio_return (3), | |
85 | .BR aio_suspend (3), | |
86 | .BR aio_write (3) |