Manual Pages for Linux CentOS command on man set_thread_area
MyWebUniversity

Manual Pages for Linux CentOS command on man set_thread_area

SETTHREADAREA(2) Linux Programmer's Manual SETTHREADAREA(2)

NAME

setthreadarea - set a thread local storage (TLS) area SYNOPSIS

#include

#include int setthreadarea(struct userdesc *uinfo); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION

setthreadarea() sets an entry in the current thread's thread-local storage (TLS) array. The TLS array entry set by setthreadarea() cor‐

responds to the value of uinfo->entrynumber passed in by the user. If this value is in bounds, setthreadarea() copies the TLS descriptor pointed to by uinfo into the thread's TLS array.

When setthreadarea() is passed an entrynumber of -1, it uses a free TLS entry. If setthreadarea() finds a free TLS entry, the value of

uinfo->entrynumber is set upon return to show which entry was changed. RETURN VALUE

setthreadarea() returns 0 on success, and -1 on failure, with errno set appropriately. ERRORS

EINVAL uinfo->entrynumber is out of bounds. EFAULT uinfo is an invalid pointer. ESRCH A free TLS entry could not be located. VERSIONS A version of setthreadarea() first appeared in Linux 2.5.29. CONFORMING TO

setthreadarea() is Linux-specific and should not be used in programs that are intended to be portable. NOTES Glibc does not provide a wrapper for this system call, since it is gen‐ erally intended only for use by threading libraries. In the unlikely event that you want to call it directly, use syscall(2). SEE ALSO getthreadarea(2) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2012-07-13 SETTHREADAREA(2)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™