1GET_THREAD_AREA(2)         Linux Programmer's Manual        GET_THREAD_AREA(2)
2
3
4

NAME

6       get_thread_area - get a thread-local storage (TLS) area
7

SYNOPSIS

9       #include <linux/unistd.h>
10       #include <asm/ldt.h>
11
12       int get_thread_area(struct user_desc *u_info);
13
14       Note: There is no glibc wrapper for this system call; see NOTES.
15

DESCRIPTION

17       get_thread_area() returns an entry in the current thread's thread-local
18       storage (TLS) array.  The index of the entry corresponds to  the  value
19       of  u_info->entry_number,  passed  in  by the user.  If the value is in
20       bounds, get_thread_area() copies the corresponding TLS entry  into  the
21       area pointed to by u_info.
22

RETURN VALUE

24       get_thread_area()  returns  0 on success.  Otherwise, it returns -1 and
25       sets errno appropriately.
26

ERRORS

28       EFAULT u_info is an invalid pointer.
29
30       EINVAL u_info->entry_number is out of bounds.
31

VERSIONS

33       A version of get_thread_area() first appeared in Linux 2.5.32.
34

CONFORMING TO

36       get_thread_area() is Linux-specific and should not be used in  programs
37       that are intended to be portable.
38

NOTES

40       Glibc does not provide a wrapper for this system call, since it is gen‐
41       erally intended for use only by threading libraries.  In  the  unlikely
42       event that you want to call it directly, use syscall(2).
43

SEE ALSO

45       modify_ldt(2), set_thread_area(2)
46

COLOPHON

48       This  page  is  part of release 3.53 of the Linux man-pages project.  A
49       description of the project, and information about reporting  bugs,  can
50       be found at http://www.kernel.org/doc/man-pages/.
51
52
53
54Linux                             2012-07-13                GET_THREAD_AREA(2)
Impressum