OSDN Git Service

Update draft for LDP 3.67
[linuxjm/LDP_man-pages.git] / draft / man2 / io_submit.2
index 58c276d..94957d7 100644 (file)
 .\" Copyright (C) 2003 Free Software Foundation, Inc.
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
 .\" This file is distributed according to the GNU General Public License.
-.\" See the file COPYING in the top level source directory for details.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI, all rights reserved.
 .\" Translated Mon Mar  8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-03-27, Akihiro MOTOKI <amotoki@gmail.com>
 .\"
-.\" .de Sh \" Subsection
-.\" .br
-.\" .if t .Sp
-.\" .ne 5
-.\" .PP
-.\" \fB\\$1\fP
-.\" .PP
-.\" ..
-.\" .de Sp \" Vertical space (when we can't use .PP)
-.\" .if t .sp .5v
-.\" .if n .sp
-.\" ..
-.\" .de Ip \" List item
-.\" .br
-.\" .ie \\n(.$>=3 .ne \\$3
-.\" .el .ne 3
-.\" .IP "\\$1" \\$2
-.\" ..
-.TH IO_SUBMIT 2 2008-06-18 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O io_submit \- submit asynchronous I/O blocks for processing
+.TH IO_SUBMIT 2 2012\-07\-13 Linux "Linux Programmer's Manual"
 .SH 名前
 io_submit \- 非同期 I/O ブロックを処理待ちキューに登録する
-.\"O .SH "SYNOPSIS"
 .SH 書式
 .nf
-.\" .ad l
-.\" .hy 0
-.B #include <libaio.h>
-.\" #include <linux/aio.h>
-.sp
-.\" .HP 16
-.BI "int io_submit(aio_context_t " ctx_id ", long " nr \
-", struct iocb **" iocbpp );
-.\" .ad
-.\" .hy
-.sp
-.\"O Link with \fI\-laio\fP.
-\fI\-laio\fP とリンクする。
+\fB#include <linux/aio_abi.h>\fP          /* 必要な型の定義 */
+
+\fBint io_submit(aio_context_t \fP\fIctx_id\fP\fB, long \fP\fInr\fP\fB, struct iocb **\fP\fIiocbpp\fP\fB);\fP
 .fi
-.\"O .SH "DESCRIPTION"
+
+\fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
 .SH 説明
 .PP
-.\"O .BR io_submit ()
-.\"O queues \fInr\fP I/O request blocks for processing in
-.\"O the AIO context \fIctx_id\fP.
-.\"O \fIiocbpp\fP should be an array of \fInr\fP AIO control blocks,
-.\"O which will be submitted to context \fIctx_id\fP.
-.BR io_submit ()
-は、AIO コンテキスト \fIctx_id\fP に \fInr\fP 個の I/O
-リクエストを処理待ちとしてキューに追加する。
-\fIiocbpp\fP は、AIO コンテキスト \fIctx_id\fP に登録される \fInr\fP 個の
-AIO 制御ブロックの配列になっていなければならない。
-.\"O .SH "RETURN VALUE"
+\fBio_submit\fP() システムコールは、AIO コンテキスト \fIctx_id\fP に \fInr\fP 個
+の I/O リクエストを処理待ちとしてキューに追加する。 \fIiocbpp\fP 引き数は、
+AIO コンテキスト \fIctx_id\fP に登録される \fInr\fP 個の AIO 制御ブロックの
+配列になっていなければならない。
 .SH 返り値
-.\"O On success,
-.\"O .BR io_submit ()
-.\"O returns the number of \fIiocb\fPs submitted (which may be
-.\"O 0 if \fInr\fP is zero).
-.\"O For the failure return, see NOTES.
-成功すると、
-.BR io_submit ()
-は登録した \fIiocb\fP の個数を返す
-(\fInr\fP が 0 の場合は 0 を返す)。
+成功すると、 \fBio_submit\fP()  は登録した \fIiocb\fP の個数を返す (\fInr\fP が 0 の場合は 0 を返す)。
 失敗時の返り値については、「注意」の節を参照すること。
-.\"O .SH "ERRORS"
 .SH エラー
-.TP
-.B EAGAIN
-.\"O Insufficient resources are available to queue any \fIiocb\fPs.
+.TP 
+\fBEAGAIN\fP
 何個かの \fIiocb\fP をキューに入れるのに必要なリソースが得られない。
-.TP
-.B EBADF
-.\"O The file descriptor specified in the first \fIiocb\fP is invalid.
+.TP 
+\fBEBADF\fP
 先頭の \fIiocb\fP に指定されたファイル・ディスクリプタが無効である。
-.TP
-.B EFAULT
-.\"O One of the data structures points to invalid data.
+.TP 
+\fBEFAULT\fP
 データ構造の中に無効なデータを指しているものがある。
-.TP
-.B EINVAL
-.\"O The \fIaio_context\fP specified by \fIctx_id\fP is invalid.
-.\"O \fInr\fP is less than 0.
-.\"O The \fIiocb\fP at *iocbpp[0] is not properly initialized,
-.\"O or the operation specified is invalid for the file descriptor
-.\"O in the \fIiocb\fP.
-\fIctx_id\fP で指定された \fIaio_context\fP が無効である。
-\fInr\fP が 0 未満である。
-*iocbpp[0] の \fIiocb\fP が適切に初期化されていないか、
-指定された操作がその \fIiocb\fP 中のファイル・ディスクリプタに対して
-無効である。
-.TP
-.B ENOSYS
-.\"O .BR io_submit ()
-.\"O is not implemented on this architecture.
-.BR io_submit ()
-はこのアーキテクチャでは実装されていない。
-.\"O .SH "VERSIONS"
+.TP 
+\fBEINVAL\fP
+\fIctx_id\fP で指定された AIO コンテキストが無効である。 \fInr\fP が 0 未満で
+ある。 \fI*iocbpp[0]\fP の \fIiocb\fP が適切に初期化されていないか、
+指定された操作がその \fIiocb\fP 中のファイル・ディスクリプタに対して 無効
+である。
+.TP 
+\fBENOSYS\fP
+\fBio_submit\fP()  はこのアーキテクチャでは実装されていない。
 .SH バージョン
 .PP
-.\"O The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
-非同期 I/O システム・コールは 2002年8月に Linux 2.5 で初めて登場した。
-.\"O .SH "CONFORMING TO"
+非同期 I/O システム・コールは Linux 2.5 で初めて登場した。
 .SH 準拠
 .PP
-.\"O .BR io_submit ()
-.\"O is Linux-specific and should not be used in
-.\"O programs that are intended to be portable.
-.BR io_submit ()
-は Linux 固有であり、移植を想定したプログラムで
-使用すべきではない。
-.\"O .SH NOTES
+\fBio_submit\fP()  は Linux 固有であり、移植を想定したプログラムで 使用すべきではない。
 .SH 注意
-.\"O Glibc does not provide a wrapper function for this system call.
-glibc はこのシステムコール用のラッパー関数を提供していない。
+.\" http://git.fedorahosted.org/git/?p=libaio.git
+glibc はこのシステムコールのラッパー関数を提供していない。
+\fBsyscall\fP(2) を使ってこのシステムコールを起動することができる。
+しかし、たいていは、このシステムコールを呼び出したいのではなく、
+ \fIlibaio\fP が提供している \fBio_submit\fP ラッパー関数を呼び出したい
+場合がほとんどであろう。
 
-.\"O The wrapper provided in
-.\"O .I libaio
-.\"O for
-.\"O .BR io_submit ()
-.\"O does not follow the usual C library conventions for indicating error:
-.\"O on error it returns a negated error number
-.\"O (the negative of one of the values listed in ERRORS).
-.\"O If the system call is invoked via
-.\"O .BR syscall (2),
-.\"O then the return value follows the usual conventions for
-.\"O indicating an error: \-1, with
-.\"O .I errno
-.\"O set to a (positive) value that indicates the error.
-.I libaio
-で
-.BR io_submit ()
-用に提供されているラッパー関数は、エラーの通知が通常の C ライブラリの
-慣習にしたがっておらず、エラーの場合には負のエラー番号
-(エラーの節に列挙されている値の一つを負にしたもの) が返り値となる。
-.BR syscall (2)
-経由でシステムコールを起動すると、返り値は通常のエラー通知の慣習に
-したがってものとなり、エラーの場合には \-1 が返り、
-.I errno
+.\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
+.\" the system call.
+\fIlibaio\fP のラッパー関数では \fIctx_id\fP 引き数に別の型
+(\fIio_context_t\fP) が使われることに注意すること。
+また、\fIlibaio\fP のラッパー関数は、エラーの通知が通常の C ライブラリの
+慣習にしたがっておらず、エラーの場合には負のエラー番号 (エラーの節に列
+挙されている値の一つを負にしたもの) が返り値となる点にも注意すること。
+\fBsyscall\fP(2) 経由でシステムコールを起動すると、返り値は通常のエラー通
+知の慣習に したがってものとなり、エラーの場合には \-1 が返り、 \fIerrno\fP
 にエラーを示す (正の) 値が設定される。
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR io_cancel (2),
-.BR io_destroy (2),
-.BR io_getevents (2),
-.BR io_setup (2),
-.BR aio (7)
-.\"O .\" .SH "NOTES"
-.\" .SH 注
-.\" .PP
-.\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
-.\" 非同期 I/O システム・コールは Benjamin LaHaise が書いた。
-.\"O .\" .SH AUTHOR
-.\" .SH 著者
+.\" .SH AUTHOR
 .\" Kent Yoder.
+\fBio_cancel\fP(2), \fBio_destroy\fP(2), \fBio_getevents\fP(2), \fBio_setup\fP(2),
+\fBaio\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。