1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 2003 Andi Kleen
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
26 .\" all rights reserved.
27 .\" Translated 2004-06-08, Yuichi SATO <ysato444@yahoo.co.jp>
28 .\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
29 .\" Updated 2008-02-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
31 .TH ARCH_PRCTL 2 2007-12-26 "Linux" "Linux Programmer's Manual"
34 .\"O arch_prctl \- set architecture-specific thread state
35 arch_prctl \- アーキテクチャ固有のスレッド状態を設定する
39 .B #include <asm/prctl.h>
41 .B #include <sys/prctl.h>
43 .BI "int arch_prctl(int " code ", unsigned long *" addr );
48 .\"O .BR arch_prctl ()
49 .\"O function sets architecture-specific process or thread state.
51 関数はアーキテクチャ固有のプロセス状態またはスレッド状態を設定する。
53 .\"O selects a subfunction
54 .\"O and passes argument
58 .\"O is interpreted as either an
59 .\"O .I "unsigned long"
60 .\"O for the "set" operations, or as an
61 .\"O .IR "unsigned long *" ,
62 .\"O for the "get" operations.
74 .\"O Sub functions for x86-64 are:
78 .\"O Set the 64-bit base for the
88 .\"O Return the 64-bit base value for the
90 .\"O register of the current thread in the
103 .\"O Set the 64-bit base for the
113 .\"O Return the 64-bit base value for the
115 .\"O register of the current thread in the
116 .\"O .I unsigned long
126 .\"O .SH RETURN VALUE
129 .\"O .BR arch_prctl ()
130 .\"O returns 0; on error, \-1 is returned, and
132 .\"O is set to indicate the error.
135 は 0 を返す。エラーの場合、\-1 を返し、
143 .\"O points to an unmapped address or is outside the process address space.
145 がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外にある。
149 .\"O is not a valid subcommand.
155 .\"O is outside the process address space.
160 .\"O .\" Man page written by Andi Kleen.
161 .\" この man ページは Andi Kleen によって書かれた。
162 .\"O .SH "CONFORMING TO"
164 .\"O .BR arch_prctl ()
165 .\"O is a Linux/x86-64 extension and should not be used in programs intended
168 は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使うべきでない。
171 .\"O .BR arch_prctl ()
172 .\"O is only supported on Linux/x86-64 for 64-bit programs currently.
174 は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサポートされている。
176 .\"O The 64-bit base changes when a new 32-bit segment selector is loaded.
177 新しい 32 ビットセグメントセレクタがロードされた場合、
181 .\"O is disabled in some kernels.
185 .\"O Context switches for 64-bit segment bases are rather expensive.
186 .\"O It may be a faster alternative to set a 32-bit base using a
187 .\"O segment selector by setting up an LDT with
188 .\"O .BR modify_ldt (2)
190 .\"O .BR set_thread_area (2)
191 .\"O system call in kernel 2.5 or later.
192 64 ビットセグメントベースのコンテキストスイッチは、やや高価である。
197 .BR set_thread_area (2)
199 32 ビットベースを設定するという高速な代替手段もある。
200 .\"O .BR arch_prctl ()
201 .\"O is only needed when you want to set bases that are larger than 4GB.
202 4GB より大きなベースを設定したい場合にのみ、
205 .\"O Memory in the first 2GB of address space can be allocated by using
210 アドレス空間の最初の 2GB にあるメモリは、
216 .\"O As of version 2.7, glibc provides no prototype for
217 .\"O .BR arch_prctl ().
218 .\"O You have to declare it yourself for now.
219 .\"O This may be fixed in future glibc versions.
220 バージョン 2.7 時点では、glibc には
223 今のところユーザは自分自身で宣言する必要がある。
224 これは将来の glibc のバージョンで修正されるかもしれない。
227 .\"O may be already used by the threading library.
229 はスレッドライブラリで既に使われているかもしれない。
235 .BR set_thread_area (2)
237 AMD X86-64 Programmer's manual