get_thread_areaのヘルプ・マニュアル
日本語 英語
get_thread_area --help
man get_thread_area
GET_THREAD_AREA(2) Linux Programmer’s Manual GET_THREAD_AREA(2)
名前
get_thread_area - スレッド局所記憶 (TLS) 領域を取り出す
書式
#include
#include
int get_thread_area(struct user_desc *u_info);
説明
get_thread_area() は 、 カ レント・スレッドのスレッド局所記憶 (Thread
Local Storage; TLS) 配列の中のエントリを返す。エントリのインデックス は
、 ユーザから引き数として渡される u_info->entry_number の値に対応してい
る。値が範囲内にある場合、 get_thread_info() は対応する TLS エントリ を
u_info で指された領域にコピーする。
返り値
成 功した場合、 get_thread_area() は 0 を返す。そうでない場合、 -1 を返
し、 errno に適切な値をセットする。
エラー
EFAULT u_info が不正なポインタである。
EINVAL u_info->entry_number が範囲外である。
バージョン
get_thread_area() は Linux 2.5.32 で初めて登場した。
準拠
get_thread_area() は Linux 独自の関数であり、移植を意図したプログラムで
は使用すべきではない。
注意
glibc はこの関数に対するラッパー関数を提供していない。このシステムコー
ルは呼び出すには syscall(2) を使うこと。
関連項目
modify_ldt(2), set_thread_area(2)
Linux 2008-11-27 GET_THREAD_AREA(2)
GET_THREAD_AREA(2) Linux Programmer’s Manual GET_THREAD_AREA(2)
NAME
get_thread_area - Get a Thread Local Storage (TLS) area
SYNOPSIS
#include
#include
int get_thread_area(struct user_desc *u_info);
DESCRIPTION
get_thread_area() returns an entry in the current thread’s Thread Local
Storage (TLS) array. The index of the entry corresponds to the value
of u_info->entry_number, passed in by the user. If the value is in
bounds, get_thread_area() copies the corresponding TLS entry into the
area pointed to by u_info.
RETURN VALUE
get_thread_area() returns 0 on success. Otherwise, it returns -1 and
sets errno appropriately.
ERRORS
EFAULT u_info is an invalid pointer.
EINVAL u_info->entry_number is out of bounds.
VERSIONS
A version of get_thread_area() first appeared in Linux 2.5.32.
CONFORMING TO
get_thread_area() is Linux-specific and should not be used in programs
that are intended to be portable.
NOTES
Glibc does not provide a wrapper for this function; call it using
syscall(2).
SEE ALSO
modify_ldt(2), set_thread_area(2)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-11-27 GET_THREAD_AREA(2)