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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

VERSIONS

31       A version of get_thread_area() first appeared in Linux 2.5.32.
32

CONFORMING TO

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

NOTES

38       Glibc  does  not  provide  a  wrapper  for this function; call it using
39       syscall(2).
40

SEE ALSO

42       modify_ldt(2), set_thread_area(2)
43

COLOPHON

45       This page is part of release 3.22 of the Linux  man-pages  project.   A
46       description  of  the project, and information about reporting bugs, can
47       be found at http://www.kernel.org/doc/man-pages/.
48
49
50
51Linux                             2008-11-27                GET_THREAD_AREA(2)
Impressum