OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / 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 .B "#include <aio.h>"
28 .sp
29 .BI "int aio_fsync(int " op ", struct aiocb *" aiocbp );
30 .sp
31 Link with \fI\-lrt\fP.
32 .SH DESCRIPTION
33 The
34 .BR 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
42 .BR O_SYNC ,
43 then all currently queued I/O operations shall be
44 completed as if by a call of
45 .BR fsync (2),
46 and if
47 .I op
48 is
49 .BR O_DSYNC ,
50 this call is the asynchronous analog of
51 .BR fdatasync (2).
52 Note that this is a request only \(em this call does not wait
53 for I/O completion.
54 .LP
55 Apart from
56 .I aio_fildes
57 the only field in the structure pointed to by
58 .I aiocbp
59 that is used by this call is the
60 .I aio_sigevent
61 field (a \fIstruct sigevent\fP) that indicates the desired type of
62 asynchronous notification at completion.
63 All other fields are ignored.
64 .SH "RETURN VALUE"
65 On success (the sync request was successfully queued)
66 this function returns 0.
67 On error \-1 is returned, and
68 .I errno
69 is set appropriately.
70 .SH ERRORS
71 .TP
72 .B EAGAIN
73 Out of resources.
74 .TP
75 .B EBADF
76 .I aio_fildes
77 is not a valid file descriptor open for writing.
78 .TP
79 .B EINVAL
80 No synchronized I/O for this file is supported, or
81 .I op
82 is not
83 .B O_SYNC
84 or
85 .BR O_DSYNC .
86 .SH "CONFORMING TO"
87 POSIX.1-2001.
88 .SH "SEE ALSO"
89 .BR aio_cancel (3),
90 .BR aio_error (3),
91 .BR aio_read (3),
92 .BR aio_return (3),
93 .BR aio_suspend (3),
94 .BR aio_write (3)