1AIO_FSYNC(3) Linux Programmer's Manual AIO_FSYNC(3)
2
3
4
6 aio_fsync - asynchronous file synchronization
7
9 #include <aio.h>
10
11 int aio_fsync(int op, struct aiocb *aiocbp);
12
13
15 The aio_fsync() function does a sync on all outstanding asynchronous
16 I/O operations associated with aiocbp->aio_fildes.
17
18 More precisely, if op is O_SYNC, then all currently queued I/O opera‐
19 tions shall be completed as if by a call of fsync(2), and if op is
20 O_DSYNC, this call is the asynchronous analog of fdatasync(2). Note
21 that this is a request only — this call does not wait for I/O comple‐
22 tion.
23
24 Apart from aio_fildes the only field in the structure pointed to by
25 aiocbp that is used by this call is the aio_sigevent field (a struct
26 sigevent) that indicates the desired type of asynchronous notification
27 at completion. All other fields are ignored.
28
30 On success (the sync request was successfully queued) this function
31 returns 0. On error -1 is returned, and errno is set appropriately.
32
34 EAGAIN Out of resources.
35
36 EBADF aio_fildes is not a valid file descriptor open for writing.
37
38 EINVAL No synchronized I/O for this file is supported, or op is not
39 O_SYNC or O_DSYNC.
40
42 POSIX.1-2001
43
45 aio_cancel(3), aio_error(3), aio_read(3), aio_return(3), aio_sus‐
46 pend(3), aio_write(3)
47
48
49
50 2003-11-14 AIO_FSYNC(3)