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.
|
get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, gettid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioprio_set.2, kexec_load.2, llseek.2, modify_ldt.2, mq_getsetattr.2, pivot_root.2, readdir.2, rt_sigqueueinfo.2, set_thread_area.2, sgetmask.2, spu_create.2, spu_run.2, subpage_prot.2, sysctl.2, tkill.2: Add note to SYNOPSIS that there is no glibc wrapper for system call
Reduce the chance that the reader may be misled into thinking
that there is a wrapper function for this system call by noting
explicitly in the SYNOPSIS that there is no glibc wrapper and
pointing the reader to NOTES for further details.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-07-13 06:48:20 +00:00
|
|
|
.TH GET_THREAD_AREA 2 2012-07-13 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
intro.1, add_key.2, get_mempolicy.2, get_thread_area.2, intro.2, keyctl.2, mbind.2, request_key.2, set_thread_area.2, clock.3, cmsg.3, getcwd.3, getpw.3, intro.3, malloc.3, posix_memalign.3, shm_open.3, sleep.3, sysconf.3, intro.4, sd.4, intro.5, locale.5, slabinfo.5, intro.6, boot.7, bootparam.7, futex.7, glob.7, hier.7, intro.7, libc.7, locale.7, mq_overview.7, netlink.7, sem_overview.7, shm_overview.7, unix.7, intro.8: Global fix: Use consistent capitalization in NAME section
The line(s) in the NAME section should only use capitals
where English usage dictates that. Otherwise, use
lowercase throughout.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-10-21 06:29:13 +00:00
|
|
|
get_thread_area \- get a thread local storage (TLS) area
|
2004-11-03 13:51:07 +00:00
|
|
|
.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 );
|
get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, gettid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioprio_set.2, kexec_load.2, llseek.2, modify_ldt.2, mq_getsetattr.2, pivot_root.2, readdir.2, rt_sigqueueinfo.2, set_thread_area.2, sgetmask.2, spu_create.2, spu_run.2, subpage_prot.2, sysctl.2, tkill.2: Add note to SYNOPSIS that there is no glibc wrapper for system call
Reduce the chance that the reader may be misled into thinking
that there is a wrapper function for this system call by noting
explicitly in the SYNOPSIS that there is no glibc wrapper and
pointing the reader to NOTES for further details.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-07-13 06:48:20 +00:00
|
|
|
|
|
|
|
.IR Note :
|
|
|
|
There is no glibc wrapper for this system call; see NOTES.
|
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-12-22 16:40:46 +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-12-22 16:40:46 +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 ()
|
2007-12-25 21:28:09 +00:00
|
|
|
is Linux-specific and should not be used in programs
|
2007-05-18 16:06:42 +00:00
|
|
|
that are intended to be portable.
|
2008-11-28 16:39:55 +00:00
|
|
|
.SH NOTES
|
get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, gettid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioprio_set.2, kexec_load.2, llseek.2, modify_ldt.2, mq_getsetattr.2, pivot_root.2, readdir.2, rt_sigqueueinfo.2, set_thread_area.2, sgetmask.2, spu_create.2, spu_run.2, subpage_prot.2, sysctl.2, tkill.2: Add note to SYNOPSIS that there is no glibc wrapper for system call
Reduce the chance that the reader may be misled into thinking
that there is a wrapper function for this system call by noting
explicitly in the SYNOPSIS that there is no glibc wrapper and
pointing the reader to NOTES for further details.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-07-13 06:48:20 +00:00
|
|
|
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
|
2008-11-28 16:39:55 +00:00
|
|
|
.BR syscall (2).
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR modify_ldt (2),
|
|
|
|
.BR set_thread_area (2)
|