OSDN Git Service

(split) LDP: Update draft and release pages (based on the previous commit)
[linuxjm/LDP_man-pages.git] / release / man2 / set_thread_area.2
1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" Author: Kent Yoder
3 .\"
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" This file is distributed according to the GNU General Public License.
6 .\" %%%LICENSE_END
7 .\"
8 .\"*******************************************************************
9 .\"
10 .\" This file was generated with po4a. Translate the source file.
11 .\"
12 .\"*******************************************************************
13 .TH SET_THREAD_AREA 2 2012\-07\-13 Linux "Linux Programmer's Manual"
14 .SH 名前
15 set_thread_area \- スレッド局所記憶 (TLS) 領域を設定する
16 .SH 書式
17 \fB#include <linux/unistd.h>\fP
18 .br
19 \fB#include <asm/ldt.h>\fP
20 .sp
21 \fBint set_thread_area(struct user_desc *\fP\fIu_info\fP\fB);\fP
22
23 \fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
24 .SH 説明
25 \fBset_thread_area\fP()  は、カレント・スレッドのスレッド局所記憶 (thread\-local storage; TLS)
26 配列の中のエントリを設定する。 \fBset_thread_area\fP()  により設定される TLS 配列のエントリは、ユーザから引き数として渡される
27 \fIu_info\->entry_number\fP の値に対応している。値が範囲内にある場合、 \fBset_thread_area\fP()  は
28 \fIu_info\fP で指された TLS ディスクリプタをスレッドの TLS 配列にコピーする。
29 .PP
30 \fIentry_number\fP として \-1 が渡された場合、 \fBset_thread_area\fP()  は未使用 (free) の TLS
31 エントリを使用する。 未使用の TLS エントリがあった場合、どのエントリが変更されたかが分かる ように終了時に
32 \fIu_info\->entry_number\fP の値が変更される。
33 .SH 返り値
34 \fBset_thread_area\fP()  は成功した場合 0 を返す。失敗した場合は \-1 を返し、 \fIerrno\fP を適切に設定する。
35 .SH エラー
36 .TP 
37 \fBEINVAL\fP
38 \fIu_info\->entry_number\fP が範囲外である。
39 .TP 
40 \fBEFAULT\fP
41 \fIu_info\fP が不正なポインタである。
42 .TP 
43 \fBESRCH\fP
44 未使用の TLS エントリが見つからなかった。
45 .SH バージョン
46 \fBset_thread_area\fP()  は Linux 2.5.29 で初めて登場した。
47 .SH 準拠
48 \fBset_thread_area\fP()  は Linux 独自であり、移植を意図したプログラムでは使用すべきではない。
49 .SH 注意
50 Glibc does not provide a wrapper for this system call, since it is generally
51 intended only for use by threading libraries.  In the unlikely event that
52 you want to call it directly, use \fBsyscall\fP(2).
53 .SH 関連項目
54 \fBget_thread_area\fP(2)
55 .SH この文書について
56 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
57 である。プロジェクトの説明とバグ報告に関する情報は
58 http://www.kernel.org/doc/man\-pages/ に書かれている。