OSDN Git Service

Complete fanotify_init.2, fanotify.7
[linuxjm/LDP_man-pages.git] / draft / man2 / arch_prctl.2
index b2bc1a7..dbb42f1 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (C) 2003 Andi Kleen
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
 .\"         all rights reserved.
 .\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
 .\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
 .\"
-.TH ARCH_PRCTL 2 2007-12-26 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O arch_prctl \- set architecture-specific thread state
-arch_prctl \- ¥¢¡¼¥­¥Æ¥¯¥Á¥ã¸ÇÍ­¤Î¥¹¥ì¥Ã¥É¾õÂÖ¤òÀßÄꤹ¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.TH ARCH_PRCTL 2 2007\-12\-26 Linux "Linux Programmer's Manual"
+.SH 名前
+arch_prctl \- アーキテクチャ固有のスレッド状態を設定する
+.SH 書式
 .nf
-.B #include <asm/prctl.h>
+\fB#include <asm/prctl.h>\fP
 .br
-.B #include <sys/prctl.h>
+\fB#include <sys/prctl.h>\fP
 .sp
-.BI "int arch_prctl(int " code ", unsigned long *" addr );
+\fBint arch_prctl(int \fP\fIcode\fP\fB, unsigned long *\fP\fIaddr\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR arch_prctl ()
-.\"O function sets architecture-specific process or thread state.
-.BR arch_prctl ()
-´Ø¿ô¤Ï¥¢¡¼¥­¥Æ¥¯¥Á¥ã¸ÇÍ­¤Î¥×¥í¥»¥¹¾õÂÖ¤Þ¤¿¤Ï¥¹¥ì¥Ã¥É¾õÂÖ¤òÀßÄꤹ¤ë¡£
-.\"O .I code
-.\"O selects a subfunction
-.\"O and passes argument
-.\"O .I addr
-.\"O to it;
-.\"O .I addr
-.\"O is interpreted as either an
-.\"O .I "unsigned long"
-.\"O for the "set" operations, or as an
-.\"O .IR "unsigned long *" ,
-.\"O for the "get" operations.
-.I code
-¤ÏÉûµ¡Ç½¤òÁªÂò¤·¡¢°ú¤­¿ô
-.I addr
-¤òÉûµ¡Ç½¤ËÅϤ¹¡£
-.I addr
-¤Ï¡¢"set" Áàºî¤Ç¤Ï
-.I "unsigned long"
-¤È¤·¤Æ¡¢"get" Áàºî¤Ç¤Ï
-.I "unsigned long *"
-¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
+.SH 説明
+\fBarch_prctl\fP()  関数はアーキテクチャ固有のプロセス状態またはスレッド状態を設定する。 \fIcode\fP は副機能を選択し、引き数
+\fIaddr\fP を副機能に渡す。 \fIaddr\fP は、"set" 操作では \fIunsigned long\fP として、"get" 操作では
+\fIunsigned long\ *\fP として解釈される。
 .LP
-.\"O Sub functions for x86-64 are:
-x86-64 ¤ÎÉûµ¡Ç½¤Ï°Ê²¼¤ÎÄ̤ê:
-.TP
-.B ARCH_SET_FS
-.\"O Set the 64-bit base for the
-.\"O .I FS
-.\"O register to
-.\"O .IR addr .
-.I FS
-¥ì¥¸¥¹¥¿¤Î 64 ¥Ó¥Ã¥È¥Ù¡¼¥¹¤ò
-.I addr
-¤ËÀßÄꤹ¤ë¡£
-.TP
-.B ARCH_GET_FS
-.\"O Return the 64-bit base value for the
-.\"O .I FS
-.\"O register of the current thread in the
-.\"O .I unsigned long
-.\"O pointed to by
-.\"O .IR addr .
-¸½ºß¤Î¥¹¥ì¥Ã¥É¤Î
-.I FS
-¥ì¥¸¥¹¥¿¤Î 64 ¥Ó¥Ã¥È¥Ù¡¼¥¹Ãͤò¡¢
-.I addr
-¤¬»Ø¤¹
-.I unsigned long
-¤ÎÎΰè¤Ë³ÊǼ¤¹¤ë¡£
-.TP
-.B ARCH_SET_GS
-.\"O Set the 64-bit base for the
-.\"O .I GS
-.\"O register to
-.\"O .IR addr .
-.I GS
-¥ì¥¸¥¹¥¿¤Î 64 ¥Ó¥Ã¥È¥Ù¡¼¥¹¤ò
-.I addr
-¤ËÀßÄꤹ¤ë¡£
-.TP
-.B ARCH_GET_GS
-.\"O Return the 64-bit base value for the
-.\"O .I GS
-.\"O register of the current thread in the
-.\"O .I unsigned long
-.\"O pointed to by
-.\"O .IR addr .
-¸½ºß¤Î¥¹¥ì¥Ã¥É¤Î
-.I GS
-¥ì¥¸¥¹¥¿¤Î 64 ¥Ó¥Ã¥È¥Ù¡¼¥¹Ãͤò¡¢
-.I addr
-¤¬»Ø¤¹
-.I unsigned long
-¤ÎÎΰè¤Ë³ÊǼ¤¹¤ë¡£
-.\"O .SH RETURN VALUE
-.SH ÊÖ¤êÃÍ
-.\"O On success,
-.\"O .BR arch_prctl ()
-.\"O returns 0; on error, \-1 is returned, and
-.\"O .I errno
-.\"O is set to indicate the error.
-À®¸ù¤¹¤ë¤È¡¢
-.BR arch_prctl ()
-¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
-.I errno
-¤ò¥¨¥é¡¼¤ò¼¨¤¹ÃͤËÀßÄꤹ¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EFAULT
-.\"O .I addr
-.\"O points to an unmapped address or is outside the process address space.
-.I addr
-¤¬¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤¿¥¢¥É¥ì¥¹¤ò»Ø¤·¤Æ¤¤¤ë¤«¡¢¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Ë¤¢¤ë¡£
-.TP
-.B EINVAL
-.\"O .I code
-.\"O is not a valid subcommand.
-.I code
-¤¬Í­¸ú¤Ê¥µ¥Ö¥³¥Þ¥ó¥É¤Ç¤Ê¤¤¡£
-.TP
-.B EPERM
-.\"O .I addr
-.\"O is outside the process address space.
-.I addr
-¤¬¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Ë¤¢¤ë¡£
-.\"O .\" .SH AUTHOR
-.\" .SH Ãø¼Ô
-.\"O .\" Man page written by Andi Kleen.
-.\" ¤³¤Î man ¥Ú¡¼¥¸¤Ï Andi Kleen ¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O .BR arch_prctl ()
-.\"O is a Linux/x86-64 extension and should not be used in programs intended
-.\"O to be portable.
-.BR arch_prctl ()
-¤Ï Linux/x86-64 ³ÈÄ¥¤Ç¤¢¤ê¡¢°Ü¿¢À­¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï»È¤¦¤Ù¤­¤Ç¤Ê¤¤¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O .BR arch_prctl ()
-.\"O is only supported on Linux/x86-64 for 64-bit programs currently.
-.BR arch_prctl ()
-¤Ï¸½ºß¤Î¤È¤³¤í Linux/x86-64 ¾å¤Î 64 ¥Ó¥Ã¥È¥×¥í¥°¥é¥à¤Ç¤Î¤ß¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
+x86\-64 の副機能は以下の通り:
+.TP 
+\fBARCH_SET_FS\fP
+\fIFS\fP レジスタの 64 ビットベースを \fIaddr\fP に設定する。
+.TP 
+\fBARCH_GET_FS\fP
+現在のスレッドの \fIFS\fP レジスタの 64 ビットベース値を、 \fIaddr\fP が指す \fIunsigned long\fP の領域に格納する。
+.TP 
+\fBARCH_SET_GS\fP
+\fIGS\fP レジスタの 64 ビットベースを \fIaddr\fP に設定する。
+.TP 
+\fBARCH_GET_GS\fP
+現在のスレッドの \fIGS\fP レジスタの 64 ビットベース値を、 \fIaddr\fP が指す \fIunsigned long\fP の領域に格納する。
+.SH 返り値
+成功すると、 \fBarch_prctl\fP()  は 0 を返す。エラーの場合、\-1 を返し、 \fIerrno\fP をエラーを示す値に設定する。
+.SH エラー
+.TP 
+\fBEFAULT\fP
+\fIaddr\fP がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外にある。
+.TP 
+\fBEINVAL\fP
+\fIcode\fP が有効なサブコマンドでない。
+.TP 
+\fBEPERM\fP
+.\" .SH AUTHOR
+.\" Man page written by Andi Kleen.
+\fIaddr\fP がプロセスのアドレス空間の外にある。
+.SH 準拠
+\fBarch_prctl\fP()  は Linux/x86\-64 拡張であり、移植性を意図したプログラムでは使うべきでない。
+.SH 注意
+\fBarch_prctl\fP()  は現在のところ Linux/x86\-64 上の 64 ビットプログラムでのみサポートされている。
 
-.\"O The 64-bit base changes when a new 32-bit segment selector is loaded.
-¿·¤·¤¤ 32 ¥Ó¥Ã¥È¥»¥°¥á¥ó¥È¥»¥ì¥¯¥¿¤¬¥í¡¼¥É¤µ¤ì¤¿¾ì¹ç¡¢
-64 ¥Ó¥Ã¥È¥Ù¡¼¥¹¤ÏÊѹ¹¤µ¤ì¤ë¡£
+新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更される。
 
-.\"O .B ARCH_SET_GS
-.\"O is disabled in some kernels.
-.B ARCH_SET_GS
-¤¬Ìµ¸ú¤Ë¤µ¤ì¤Æ¤¤¤ë¥«¡¼¥Í¥ë¤â¤¢¤ë¡£
+\fBARCH_SET_GS\fP が無効にされているカーネルもある。
 
-.\"O Context switches for 64-bit segment bases are rather expensive.
-.\"O It may be a faster alternative to set a 32-bit base using a
-.\"O segment selector by setting up an LDT with
-.\"O .BR modify_ldt (2)
-.\"O or using the
-.\"O .BR set_thread_area (2)
-.\"O system call in kernel 2.5 or later.
-64 ¥Ó¥Ã¥È¥»¥°¥á¥ó¥È¥Ù¡¼¥¹¤Î¥³¥ó¥Æ¥­¥¹¥È¥¹¥¤¥Ã¥Á¤Ï¡¢¤ä¤ä¹â²Á¤Ç¤¢¤ë¡£
-LDT ¤ò
-.BR modify_ldt (2)
-¤ÇÀßÄꤷ¤Æ¥»¥°¥á¥ó¥È¥»¥ì¥¯¥¿¤ò»È¤¦¤«¡¢
-(¥«¡¼¥Í¥ë 2.5 °Ê¹ß¤Î)
-.BR set_thread_area (2)
-¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤¦¤³¤È¤Ë¤è¤ê¡¢
-32 ¥Ó¥Ã¥È¥Ù¡¼¥¹¤òÀßÄꤹ¤ë¤È¤¤¤¦¹â®¤ÊÂåÂؼêÃʤ⤢¤ë¡£
-.\"O .BR arch_prctl ()
-.\"O is only needed when you want to set bases that are larger than 4GB.
-4GB ¤è¤êÂ礭¤Ê¥Ù¡¼¥¹¤òÀßÄꤷ¤¿¤¤¾ì¹ç¤Ë¤Î¤ß¡¢
-.BR arch_prctl ()
-¤¬É¬ÍפǤ¢¤ë¡£
-.\"O Memory in the first 2GB of address space can be allocated by using
-.\"O .BR mmap (2)
-.\"O with the
-.\"O .B MAP_32BIT
-.\"O flag.
-¥¢¥É¥ì¥¹¶õ´Ö¤ÎºÇ½é¤Î 2GB ¤Ë¤¢¤ë¥á¥â¥ê¤Ï¡¢
-.BR mmap (2)
-¤Ë
-.B MAP_32BIT
-¥Õ¥é¥°¤ò»ØÄꤷ¤Æ³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を \fBmodify_ldt\fP(2)
+で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降の)  \fBset_thread_area\fP(2)  システムコールを使うことにより、
+32 ビットベースを設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合にのみ、 \fBarch_prctl\fP()
+が必要である。 アドレス空間の最初の 2GB にあるメモリは、 \fBmmap\fP(2)  に \fBMAP_32BIT\fP
+フラグを指定して割り当てることができる。
 
-.\"O As of version 2.7, glibc provides no prototype for
-.\"O .BR arch_prctl ().
-.\"O You have to declare it yourself for now.
-.\"O This may be fixed in future glibc versions.
-¥Ð¡¼¥¸¥ç¥ó 2.7 »þÅÀ¤Ç¤Ï¡¢glibc ¤Ë¤Ï
-.BR arch_prctl ()
-¤Î¥×¥í¥È¥¿¥¤¥×¤¬¤Ê¤¤¡£
-º£¤Î¤È¤³¤í¥æ¡¼¥¶¤Ï¼«Ê¬¼«¿È¤ÇÀë¸À¤¹¤ëɬÍפ¬¤¢¤ë¡£
-¤³¤ì¤Ï¾­Íè¤Î glibc ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç½¤Àµ¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
+バージョン 2.7 時点では、glibc には \fBarch_prctl\fP()  のプロトタイプがない。
+今のところユーザは自分自身で宣言する必要がある。 これは将来の glibc のバージョンで修正されるかもしれない。
 
-.\"O .I FS
-.\"O may be already used by the threading library.
-.I FS
-¤Ï¥¹¥ì¥Ã¥É¥é¥¤¥Ö¥é¥ê¤Ç´û¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR mmap (2),
-.BR modify_ldt (2),
-.BR prctl (2),
-.BR set_thread_area (2)
-.sp
-AMD X86-64 Programmer's manual
+\fIFS\fP はスレッドライブラリで既に使われているかもしれない。
+.SH 関連項目
+\fBmmap\fP(2), \fBmodify_ldt\fP(2), \fBprctl\fP(2), \fBset_thread_area\fP(2)
+
+AMD X86\-64 Programmer's manual
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.76 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。