OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / set_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 .\" Author: Kent Yoder
6 .\"
7 .\"*******************************************************************
8 .\"
9 .\" This file was generated with po4a. Translate the source file.
10 .\"
11 .\"*******************************************************************
12 .TH SET_THREAD_AREA 2 2008\-11\-27 Linux "Linux Programmer's Manual"
13 .SH 名前
14 set_thread_area \- スレッド局所記憶 (TLS) 領域を設定する
15 .SH 書式
16 \fB#include <linux/unistd.h>\fP
17 .br
18 \fB#include <asm/ldt.h>\fP
19 .sp
20 \fBint set_thread_area(struct user_desc *\fP\fIu_info\fP\fB);\fP
21 .SH 説明
22 \fBset_thread_area\fP()  は、カレント・スレッドのスレッド局所記憶 (Thread Local Storage; TLS)
23 配列の中のエントリを設定する。 \fBset_thread_area\fP()  により設定される TLS 配列のエントリは、ユーザから引き数として渡される
24 \fIu_info\->entry_number\fP の値に対応している。値が範囲内にある場合、 \fBset_thread_area\fP()  は
25 \fIu_info\fP で指された TLS ディスクリプタをスレッドの TLS 配列にコピーする。
26 .PP
27 \fIentry_number\fP として \-1 が渡された場合、 \fBset_thread_area\fP()  は未使用 (free) の TLS
28 エントリを使用する。 未使用の TLS エントリがあった場合、どのエントリが変更されたかが分かる ように終了時に
29 \fIu_info\->entry_number\fP の値が変更される。
30 .SH 返り値
31 \fBset_thread_area\fP()  は成功した場合 0 を返す。失敗した場合は \-1 を返し、 \fIerrno\fP を適切に設定する。
32 .SH エラー
33 .TP 
34 \fBEINVAL\fP
35 \fIu_info\->entry_number\fP が範囲外である。
36 .TP 
37 \fBEFAULT\fP
38 \fIu_info\fP が不正なポインタである。
39 .TP 
40 \fBESRCH\fP
41 未使用の TLS エントリが見つからなかった。
42 .SH バージョン
43 \fBset_thread_area\fP()  は Linux 2.5.29 で初めて登場した。
44 .SH 準拠
45 \fBset_thread_area\fP()  は Linux 独自であり、移植を意図したプログラムでは使用すべきではない。
46 .SH 注意
47 glibc はこのシステムコールに対するラッパー関数を提供していない。 このシステムコールは呼び出すには \fBsyscall\fP(2)  を使うこと。
48 .SH 関連項目
49 \fBget_thread_area\fP(2)