1aio_fsync(3)               Library Functions Manual               aio_fsync(3)
2
3
4

NAME

6       aio_fsync - asynchronous file synchronization
7

LIBRARY

9       Real-time library (librt, -lrt)
10

SYNOPSIS

12       #include <aio.h>
13
14       int aio_fsync(int op, struct aiocb *aiocbp);
15

DESCRIPTION

17       The  aio_fsync()  function  does a sync on all outstanding asynchronous
18       I/O operations associated with aiocbp->aio_fildes.  (See aio(7)  for  a
19       description of the aiocb structure.)
20
21       More  precisely,  if op is O_SYNC, then all currently queued I/O opera‐
22       tions shall be completed as if by a call of  fsync(2),  and  if  op  is
23       O_DSYNC, this call is the asynchronous analog of fdatasync(2).
24
25       Note that this is a request only; it does not wait for I/O completion.
26
27       Apart  from  aio_fildes,  the only field in the structure pointed to by
28       aiocbp that is used by this call is the aio_sigevent field (a  sigevent
29       structure,  described in sigevent(7)), which indicates the desired type
30       of asynchronous notification at completion.  All other fields  are  ig‐
31       nored.
32

RETURN VALUE

34       On success (the sync request was successfully queued) this function re‐
35       turns 0.  On error, -1 is returned, and errno is set  to  indicate  the
36       error.
37

ERRORS

39       EAGAIN Out of resources.
40
41       EBADF  aio_fildes is not a valid file descriptor open for writing.
42
43       EINVAL Synchronized  I/O  is  not supported for this file, or op is not
44              O_SYNC or O_DSYNC.
45
46       ENOSYS aio_fsync() is not implemented.
47

ATTRIBUTES

49       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
50       tributes(7).
51
52       ┌────────────────────────────────────────────┬───────────────┬─────────┐
53Interface                                   Attribute     Value   
54       ├────────────────────────────────────────────┼───────────────┼─────────┤
55aio_fsync()                                 │ Thread safety │ MT-Safe │
56       └────────────────────────────────────────────┴───────────────┴─────────┘
57

STANDARDS

59       POSIX.1-2008.
60

HISTORY

62       glibc 2.1.  POSIX.1-2001.
63

SEE ALSO

65       aio_cancel(3),   aio_error(3),   aio_read(3),  aio_return(3),  aio_sus‐
66       pend(3), aio_write(3), lio_listio(3), aio(7), sigevent(7)
67
68
69
70Linux man-pages 6.04              2023-03-30                      aio_fsync(3)
Impressum