2004-11-03 13:51:07 +00:00
|
|
|
.\" 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.
|
2007-05-30 05:36:26 +00:00
|
|
|
.TH GET_THREAD_AREA 2 2003-02-21 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
get_thread_area \- Get a Thread Local Storage (TLS) area
|
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.B #include <linux/unistd.h>
|
|
|
|
.br
|
|
|
|
.B #include <asm/ldt.h>
|
|
|
|
.sp
|
2006-08-04 09:41:28 +00:00
|
|
|
.BI "int get_thread_area(struct user_desc *" u_info );
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "DESCRIPTION"
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR get_thread_area ()
|
2007-04-12 22:42:49 +00:00
|
|
|
returns an entry in the current thread's Thread Local Storage (TLS) array.
|
|
|
|
The index of the entry corresponds to the value
|
2007-07-18 20:24:30 +00:00
|
|
|
of \fIu_info->entry_number\fP, passed in by the user.
|
2007-05-12 13:17:39 +00:00
|
|
|
If the value is in bounds,
|
|
|
|
.BR get_thread_area ()
|
|
|
|
copies the corresponding
|
2007-07-18 20:24:30 +00:00
|
|
|
TLS entry into the area pointed to by \fIu_info\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "RETURN VALUE"
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR get_thread_area ()
|
2007-04-12 22:42:49 +00:00
|
|
|
returns 0 on success.
|
2004-11-03 13:51:07 +00:00
|
|
|
Otherwise, it returns \-1 and sets
|
|
|
|
.I errno
|
|
|
|
appropriately.
|
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
|
|
|
.B EFAULT
|
2007-07-18 20:24:30 +00:00
|
|
|
\fIu_info\fP is an invalid pointer.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B EINVAL
|
2007-07-18 20:24:30 +00:00
|
|
|
\fIu_info->entry_number\fP is out of bounds.
|
2007-05-16 04:53:05 +00:00
|
|
|
.SH VERSIONS
|
2004-11-03 13:51:07 +00:00
|
|
|
A version of
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR get_thread_area ()
|
2004-11-03 13:51:07 +00:00
|
|
|
first appeared in Linux 2.5.32.
|
2007-05-18 16:06:42 +00:00
|
|
|
.SH "CONFORMING TO"
|
|
|
|
.BR get_thread_area ()
|
|
|
|
is Linux specific and should not be used in programs
|
|
|
|
that are intended to be portable.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR modify_ldt (2),
|
|
|
|
.BR set_thread_area (2)
|