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

NAME

6       set_thread_area - Set a Thread Local Storage (TLS) area
7

SYNOPSIS

9       #include <linux/unistd.h>
10       #include <asm/ldt.h>
11
12       int set_thread_area(struct user_desc *u_info);
13

DESCRIPTION

15       set_thread_area()  sets  an  entry in the current thread's Thread Local
16       Storage (TLS) array.  The TLS array entry set by set_thread_area() cor‐
17       responds  to  the  value of u_info->entry_number passed in by the user.
18       If this value is in bounds, set_thread_area() copies the TLS descriptor
19       pointed to by u_info into the thread's TLS array.
20
21       When  set_thread_area() is passed an entry_number of -1, it uses a free
22       TLS entry.  If set_thread_area() finds a free TLS entry, the  value  of
23       u_info->entry_number  is  set  upon  return  to  show  which  entry was
24       changed.
25

RETURN VALUE

27       set_thread_area() returns 0 on success, and -1 on failure,  with  errno
28       set appropriately.
29

ERRORS

31       EINVAL u_info->entry_number is out of bounds.
32
33       EFAULT u_info is an invalid pointer.
34
35       ESRCH  A free TLS entry could not be located.
36

VERSIONS

38       A version of set_thread_area() first appeared in Linux 2.5.29.
39

CONFORMING TO

41       set_thread_area()  is Linux-specific and should not be used in programs
42       that are intended to be portable.
43

NOTES

45       Glibc does not provide a wrapper for this system call;  call  it  using
46       syscall(2).
47

SEE ALSO

49       get_thread_area(2)
50

COLOPHON

52       This  page  is  part of release 3.25 of the Linux man-pages project.  A
53       description of the project, and information about reporting  bugs,  can
54       be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58Linux                             2008-11-27                SET_THREAD_AREA(2)
Impressum