.\" Copyright (C) 2003 Free Software Foundation, Inc. .\" This file is distributed according to the GNU General Public License. .\" See the file COPYING in the top level source directory for details. .\" .\" Written by Kent Yoder. .TH GET_THREAD_AREA 2 2012-07-13 "Linux" "Linux Programmer's Manual" .SH NAME get_thread_area \- get a thread-local storage (TLS) area .SH "SYNOPSIS" .B #include .br .B #include .sp .BI "int get_thread_area(struct user_desc *" u_info ); .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH "DESCRIPTION" .BR 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 \fIu_info\->entry_number\fP, passed in by the user. If the value is in bounds, .BR get_thread_area () copies the corresponding TLS entry into the area pointed to by \fIu_info\fP. .SH "RETURN VALUE" .BR get_thread_area () returns 0 on success. Otherwise, it returns \-1 and sets .I errno appropriately. .SH ERRORS .TP .B EFAULT \fIu_info\fP is an invalid pointer. .TP .B EINVAL \fIu_info\->entry_number\fP is out of bounds. .SH VERSIONS A version of .BR get_thread_area () first appeared in Linux 2.5.32. .SH "CONFORMING TO" .BR get_thread_area () is Linux-specific and should not be used in programs that are intended to be portable. .SH NOTES Glibc does not provide a wrapper for this system call, since it is generally intended only for use by threading libraries. In the unlikely event that you want to call it directly, use .BR syscall (2). .SH "SEE ALSO" .BR modify_ldt (2), .BR set_thread_area (2) .SH COLOPHON This page is part of release 3.44 of the Linux .I man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.