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. If
18       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
26

RETURN VALUE

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

ERRORS

33       EINVAL u_info->entry_number is out of bounds.
34
35       EFAULT u_info is an invalid pointer.
36
37       ESRCH  A free TLS entry could not be located.
38
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
44

VERSIONS

46       A version of set_thread_area() first appeared in Linux 2.5.29.
47
48

SEE ALSO

50       get_thread_area(2).
51
52
53
54Linux 2.5.29                      2003-02-21                SET_THREAD_AREA(2)
Impressum