1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
7 .TH "SET_THREAD_AREA" 2 "2003-02-21" "Linux 2.5.29" "Linux Programmer's Manual"
9 set_thread_area \- Set a Thread Local Storage (TLS) area
11 .B #include <linux/unistd.h>
13 .B #include <asm/ldt.h>
15 .BI "int set_thread_area (struct user_desc *" u_info );
18 sets an entry in the current thread's Thread Local Storage (TLS) array.
19 The TLS array entry set by
21 corresponds to the value of
22 .I u_info->entry_number
23 passed in by the user. If this value is in bounds,
25 copies the TLS descriptor pointed to by
27 into the thread's TLS array.
33 of \-1, it uses a free TLS entry. If
35 finds a free TLS entry, the value of
36 .I u_info->entry_number
37 is set upon return to show which entry was changed.
41 returns 0 on success, and \-1 on failure, with
48 \fIu_info->\fR\fIentry_number\fR is out of bounds.
51 \fIu_info\fR is an invalid pointer.
54 A free TLS entry could not be located.
58 is Linux specific and should not be used in programs that are intended
64 first appeared in Linux 2.5.29.
67 .BR get_thread_area (2).