1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" Written by Kent Yoder.
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" This file is distributed according to the GNU General Public License.
8 .TH GET_THREAD_AREA 2 2012-07-13 "Linux" "Linux Programmer's Manual"
10 get_thread_area \- get a thread-local storage (TLS) area
12 .B #include <linux/unistd.h>
14 .B #include <asm/ldt.h>
16 .BI "int get_thread_area(struct user_desc *" u_info );
19 There is no glibc wrapper for this system call; see NOTES.
21 .BR get_thread_area ()
22 returns an entry in the current thread's thread-local storage (TLS) array.
23 The index of the entry corresponds to the value
24 of \fIu_info\->entry_number\fP, passed in by the user.
25 If the value is in bounds,
26 .BR get_thread_area ()
27 copies the corresponding
28 TLS entry into the area pointed to by \fIu_info\fP.
30 .BR get_thread_area ()
32 Otherwise, it returns \-1 and sets
38 \fIu_info\fP is an invalid pointer.
41 \fIu_info\->entry_number\fP is out of bounds.
44 .BR get_thread_area ()
45 first appeared in Linux 2.5.32.
47 .BR get_thread_area ()
48 is Linux-specific and should not be used in programs
49 that are intended to be portable.
51 Glibc does not provide a wrapper for this system call,
52 since it is generally intended for use only by threading libraries.
53 In the unlikely event that you want to call it directly, use
57 .BR set_thread_area (2)