OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man2 / get_thread_area.2
1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
4 .\"
5 .\" Written by Kent Yoder.
6 .\"
7 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
8 .\"         all rights reserved.
9 .\" Translated Tue Jul  8 03:28:55 JST 2003
10 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .\"
12 .\"WORD:        Thread Local Storage    スレッド局所記憶
13 .\"
14 .TH GET_THREAD_AREA 2 2008-11-27 "Linux" "Linux Programmer's Manual"
15 .SH 名前
16 get_thread_area \- スレッド局所記憶 (TLS) 領域を取り出す
17 .SH 書式
18 .B #include <linux/unistd.h>
19 .br
20 .B #include <asm/ldt.h>
21 .sp
22 .BI "int get_thread_area(struct user_desc *" u_info );
23 .SH 説明
24 .BR get_thread_area ()
25 は、カレント・スレッドのスレッド局所記憶
26 (Thread Local Storage; TLS) 配列の中のエントリを返す。
27 エントリのインデックスは、ユーザから引き数として渡される
28 \fIu_info\->entry_number\fP の値に対応している。
29 値が範囲内にある場合、
30 .BR get_thread_info ()
31 は対応する TLS エントリを
32 \fIu_info\fP で指された領域にコピーする。
33 .SH 返り値
34 成功した場合、
35 .BR get_thread_area ()
36 は 0 を返す。
37 そうでない場合、 \-1 を返し、
38 .I errno
39 に適切な値をセットする。
40 .SH エラー
41 .TP
42 .B EFAULT
43 \fIu_info\fP が不正なポインタである。
44 .TP
45 .B EINVAL
46 \fIu_info\->entry_number\fP が範囲外である。
47 .SH バージョン
48 .BR get_thread_area ()
49 は Linux 2.5.32 で初めて登場した。
50 .SH 準拠
51 .BR get_thread_area ()
52 は Linux 独自の関数であり、
53 移植を意図したプログラムでは使用すべきではない。
54 .SH 注意
55 glibc はこのシステムコールに対するラッパー関数を提供していない。
56 このシステムコールは呼び出すには
57 .BR syscall (2)
58 を使うこと。
59 .SH 関連項目
60 .BR modify_ldt (2),
61 .BR set_thread_area (2)