OSDN Git Service

(split) LDP: Translate several pages
[linuxjm/LDP_man-pages.git] / draft / man2 / syscall.2
index 571a290..c8f3627 100644 (file)
@@ -69,13 +69,11 @@ syscall \- 間接システムコール
 .SH 注意
 \fBsyscall\fP()  は 4BSD で最初に登場した。
 .SS アーキテクチャ固有の要件
-Each architecture ABI has its own requirements on how system call arguments
-are passed to the kernel.  For system calls that have a glibc wrapper (e.g.,
-most system calls), glibc handles the details of copying arguments to the
-right registers in a manner suitable for the architecture.  However, when
-using \fBsyscall\fP()  to make a system call, the caller might need to handle
-architecture\-dependent details; this requirement is most commonly
-encountered on certain 32\-bit architectures.
+各アーキテクチャの ABI には、 システムコールの引き数のカーネルへの渡し方に関する独自の要件がある。
+(ほとんどのシステムコールのように) glibc ラッパー関数があるシステムコールでは、 glibc
+が詳細を処理し、アーキテクチャに応じた方法で引き数が適切なレジスタにコピーされる。 しかし、 システムコールを呼び出すのに \fBsyscall\fP()
+を使う場合には、 呼び出し側でアーキテクチャ依存の詳細を処理しなければならない場合がある。 これはいくつかの 32
+ビットアーキテクチャでは非常によくあることだ。
 
 例えば、ARM アーキテクチャの Embedded ABI (EABI) では、 (\fIlong long\fP などの) 64
 ビット値は偶数番地のレジスタのペアに境界があっていなければならない。したがって、 glibc が提供するラッパー関数ではなく \fBsyscall\fP()
@@ -101,15 +99,13 @@ syscall(SYS_readahead, fd, 0,
 次のシステムコールに影響がある: \fBfadvise64_64\fP(2), \fBftruncate64\fP(2), \fBposix_fadvise\fP(2),
 \fBpread64\fP(2), \fBpwrite64\fP(2), \fBreadahead\fP(2), \fBsync_file_range\fP(2),
 \fBtruncate64\fP(2)
-.SS "Architecture calling conventions"
-Every architecture has its own way of invoking and passing arguments to the
-kernel.  The details for various architectures are listed in the two tables
-below.
+.SS アーキテクチャ毎の呼び出し規約
+各アーキテクチャには、それぞれ独自のシステムコール起動方法とカーネルへの引き数の渡し方がある。 各種のアーキテクチャの詳細を以下の 2
+つの表にまとめる。
 
-The first table lists the instruction used to transition to kernel mode,
-(which might not be the fastest or best way to transition to the kernel, so
-you might have to refer to the VDSO), the register used to indicate the
-system call number, and the register used to return the system call result.
+最初の表は、 カーネルモードに遷移するのに使用される命令、 システムコール番号を示すのに使用されるレジスタ、
+システムコールの結果を返すのに使用されるレジスタの一覧である (なお、 ここに載っているカーネルモードに遷移するのに使用される命令は、
+カーネルモードに遷移する最速や最善の方法でない場合もあるので、 VDSO を参照する必要があるかもしれない)。
 .if  t \{\
 .ft CW
 \}
@@ -132,7 +128,7 @@ x86_64      syscall rax     rax
 .ft P
 \}
 .PP
-The second table shows the registers used to pass the system call arguments.
+2 つ目の表は、システムコールの引き数を渡すのに使用されるレジスタの一覧である。
 .if  t \{\
 .ft CW
 \}
@@ -155,8 +151,8 @@ x86_64      rdi     rsi     rdx     r10     r8      r9      \-
 .ft P
 \}
 .PP
-Note that these tables don't cover the entire calling convention\(emsome
-architectures may indiscriminately clobber other registers not listed here.
+これらの表にはすべての呼び出し規約が記載されているわけではない点に注意すること \(em
+アーキテクチャによっては、ここに記載されていない他のレジスタが見境なく上書きされる場合もある。
 .SH 例
 .nf
 #define _GNU_SOURCE