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 2012-07-13 "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 );
17 There is no glibc wrapper for this system call; see NOTES.
19 .BR get_thread_area ()
20 returns an entry in the current thread's thread-local storage (TLS) array.
21 The index of the entry corresponds to the value
22 of \fIu_info\->entry_number\fP, passed in by the user.
23 If the value is in bounds,
24 .BR get_thread_area ()
25 copies the corresponding
26 TLS entry into the area pointed to by \fIu_info\fP.
28 .BR get_thread_area ()
30 Otherwise, it returns \-1 and sets
36 \fIu_info\fP is an invalid pointer.
39 \fIu_info\->entry_number\fP is out of bounds.
42 .BR get_thread_area ()
43 first appeared in Linux 2.5.32.
45 .BR get_thread_area ()
46 is Linux-specific and should not be used in programs
47 that are intended to be portable.
49 Glibc does not provide a wrapper for this system call,
50 since it is generally intended only for use by threading libraries.
51 In the unlikely event that you want to call it directly, use
55 .BR set_thread_area (2)