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.
6 .TH GET_THREAD_AREA 2 2008-11-27 "Linux" "Linux Programmer's Manual"
8 get_thread_area \- Get a Thread Local Storage (TLS) area
10 .B #include <linux/unistd.h>
12 .B #include <asm/ldt.h>
14 .BI "int get_thread_area(struct user_desc *" u_info );
16 .BR get_thread_area ()
17 returns an entry in the current thread's Thread Local Storage (TLS) array.
18 The index of the entry corresponds to the value
19 of \fIu_info\->entry_number\fP, passed in by the user.
20 If the value is in bounds,
21 .BR get_thread_area ()
22 copies the corresponding
23 TLS entry into the area pointed to by \fIu_info\fP.
25 .BR get_thread_area ()
27 Otherwise, it returns \-1 and sets
33 \fIu_info\fP is an invalid pointer.
36 \fIu_info\->entry_number\fP is out of bounds.
39 .BR get_thread_area ()
40 first appeared in Linux 2.5.32.
42 .BR get_thread_area ()
43 is Linux-specific and should not be used in programs
44 that are intended to be portable.
46 Glibc does not provide a wrapper for this system call;
51 .BR set_thread_area (2)