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.
5 .\" Written by Kent Yoder.
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>
12 .\"WORD: Thread Local Storage ¥¹¥ì¥Ã¥É¶É½êµ²±
14 .TH GET_THREAD_AREA 2 2008-11-27 "Linux" "Linux Programmer's Manual"
16 .\"O get_thread_area \- Get a Thread Local Storage (TLS) area
18 get_thread_area \- ¥¹¥ì¥Ã¥É¶É½êµ²± (TLS) Îΰè¤ò¼è¤ê½Ð¤¹
21 .B #include <linux/unistd.h>
23 .B #include <asm/ldt.h>
25 .BI "int get_thread_area(struct user_desc *" u_info );
26 .\"O .SH "DESCRIPTION"
28 .\"O .BR get_thread_area ()
29 .\"O returns an entry in the current thread's Thread Local Storage (TLS) array.
30 .\"O The index of the entry corresponds to the value
31 .\"O of \fIu_info\->entry_number\fP, passed in by the user.
32 .\"O If the value is in bounds,
33 .\"O .BR get_thread_info ()
34 .\"O copies the corresponding
35 .\"O TLS entry into the area pointed to by \fIu_info\fP.
36 .BR get_thread_area ()
37 ¤Ï¡¢¥«¥ì¥ó¥È¡¦¥¹¥ì¥Ã¥É¤Î¥¹¥ì¥Ã¥É¶É½êµ²±
38 (Thread Local Storage; TLS) ÇÛÎó¤ÎÃæ¤Î¥¨¥ó¥È¥ê¤òÊÖ¤¹¡£
39 ¥¨¥ó¥È¥ê¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¥æ¡¼¥¶¤«¤é°ú¤¿ô¤È¤·¤ÆÅϤµ¤ì¤ë
40 \fIu_info\->entry_number\fP ¤ÎÃͤËÂбþ¤·¤Æ¤¤¤ë¡£
41 Ãͤ¬ÈÏ°ÏÆâ¤Ë¤¢¤ë¾ì¹ç¡¢
42 .BR get_thread_info ()
43 ¤ÏÂбþ¤¹¤ë TLS ¥¨¥ó¥È¥ê¤ò
44 \fIu_info\fP ¤Ç»Ø¤µ¤ì¤¿Îΰè¤Ë¥³¥Ô¡¼¤¹¤ë¡£
45 .\"O .SH "RETURN VALUE"
47 .\"O .BR get_thread_area ()
48 .\"O returns 0 on success.
49 .\"O Otherwise, it returns \-1 and sets
53 .BR get_thread_area ()
55 ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢ \-1 ¤òÊÖ¤·¡¢
57 ¤ËŬÀÚ¤ÊÃͤò¥»¥Ã¥È¤¹¤ë¡£
62 .\"O \fIu_info\fP is an invalid pointer.
63 \fIu_info\fP ¤¬ÉÔÀµ¤Ê¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
66 .\"O \fIu_info\->entry_number\fP is out of bounds.
67 \fIu_info\->entry_number\fP ¤¬Èϰϳ°¤Ç¤¢¤ë¡£
71 .\"O .BR get_thread_area ()
72 .\"O first appeared in Linux 2.5.32.
73 .BR get_thread_area ()
74 ¤Ï Linux 2.5.32 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
75 .\"O .SH "CONFORMING TO"
77 .\"O .BR get_thread_area ()
78 .\"O is Linux-specific and should not be used in programs
79 .\"O that are intended to be portable.
80 .BR get_thread_area ()
81 ¤Ï Linux Æȼ«¤Î´Ø¿ô¤Ç¤¢¤ê¡¢
82 °Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï»ÈÍѤ¹¤Ù¤¤Ç¤Ï¤Ê¤¤¡£
85 .\"O Glibc does not provide a wrapper for this system call;
88 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
89 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¸Æ¤Ó½Ð¤¹¤Ë¤Ï
95 .BR set_thread_area (2)