aio_fsync
Section: C Library Functions (3)
Updated: 2026-02-08
Index
JM Home Page
roff page
名前
aio_fsync - 非同期ファイルを同期させる
ライブラリ
リアルタイムライブラリ (librt,~-lrt)
書式
#include <aio.h>
int aio_fsync(int op, struct aiocb *aiocbp);
説明
aio_fsync() 関数は、 aiocbp->aio_fildes で関連付けられているまだ
完了していない全ての非同期 I/O 操作を同期させる。
(aiocb 構造体の説明は aio(7) を参照)
より正確に言うと、 op が O_SYNC の場合、現在キューに入れられている全て
の I/O 操作は、 fsync(2) が呼ばれたかのように完了されるだろう。 また
op が O_DSYNC の場合、この呼び出しは fdatasync(2) の非同期版となる。
この関数はリクエストを行うだけである点に注意すること。
I/O の完了の待ち合わせは行わない。
Apart from aio_fildes, the only field in the structure pointed to by
aiocbp that is used by this call is the aio_sigevent field (a
sigevent structure, described in sigevent(3type)), which indicates the
desired type of asynchronous notification at completion. All other fields
are ignored.
返り値
On success (the sync request was successfully queued) this function returns
0. On error, -1 is returned, and errno is set to indicate the error.
エラー
- EAGAIN
-
リソースが足りない。
- EBADF
-
aio_fildes が書き込みのためにオープンされた有効なファイルディスクリプターではない。
- EINVAL
-
このファイルでは同期 I/O がサポートされていない。
または op が O_SYNC でも O_DSYNC でもない。
- ENOSYS
-
aio_fsync() は実装されていない。
属性
この節で使用されている用語の説明については、 attributes(7) を参照。
| インターフェース | 属性 | 値
|
|
aio_fsync()
| Thread safety | MT-Safe
|
標準規格
POSIX.1-2008.
歴史
glibc 2.1. POSIX.1-2001.
関連項目
aio_cancel(3), aio_error(3), aio_read(3), aio_return(3),
aio_suspend(3), aio_write(3), lio_listio(3), aio(7),
sigevent(3type)
Index
- 名前
-
- ライブラリ
-
- 書式
-
- 説明
-
- 返り値
-
- エラー
-
- 属性
-
- 標準規格
-
- 歴史
-
- 関連項目
-
This document was created by
man2html,
using the manual pages.