man-pages/man2/get_thread_area.2

48 lines
1.3 KiB
Groff
Raw Normal View History

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
.BI "int get_thread_area(struct user_desc *" u_info );
2004-11-03 13:51:07 +00:00
.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.
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"
.BR get_thread_area ()
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
\fIu_info\->entry_number\fP is out of bounds.
.SH VERSIONS
2004-11-03 13:51:07 +00:00
A version of
.BR get_thread_area ()
2004-11-03 13:51:07 +00:00
first appeared in Linux 2.5.32.
.SH "CONFORMING TO"
.BR get_thread_area ()
2007-12-25 21:28:09 +00:00
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)