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.
7 .\"*******************************************************************
9 .\" This file was generated with po4a. Translate the source file.
11 .\"*******************************************************************
12 .TH SET_THREAD_AREA 2 2008\-11\-27 Linux "Linux Programmer's Manual"
14 set_thread_area \- スレッド局所記憶 (TLS) 領域を設定する
16 \fB#include <linux/unistd.h>\fP
18 \fB#include <asm/ldt.h>\fP
20 \fBint set_thread_area(struct user_desc *\fP\fIu_info\fP\fB);\fP
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 配列にコピーする。
27 \fIentry_number\fP として \-1 が渡された場合、 \fBset_thread_area\fP() は未使用 (free) の TLS
28 エントリを使用する。 未使用の TLS エントリがあった場合、どのエントリが変更されたかが分かる ように終了時に
29 \fIu_info\->entry_number\fP の値が変更される。
31 \fBset_thread_area\fP() は成功した場合 0 を返す。失敗した場合は \-1 を返し、 \fIerrno\fP を適切に設定する。
35 \fIu_info\->entry_number\fP が範囲外である。
38 \fIu_info\fP が不正なポインタである。
41 未使用の TLS エントリが見つからなかった。
43 \fBset_thread_area\fP() は Linux 2.5.29 で初めて登場した。
45 \fBset_thread_area\fP() は Linux 独自であり、移植を意図したプログラムでは使用すべきではない。
47 glibc はこのシステムコールに対するラッパー関数を提供していない。 このシステムコールは呼び出すには \fBsyscall\fP(2) を使うこと。
49 \fBget_thread_area\fP(2)