aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/tls.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:09:49 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:15:17 -0400
commit1bbd5f21f426d99660ea8120b79595a282e5ff8a (patch)
treef9980460722d4f89ca468c7af92502daa82d8c1a /arch/um/os-Linux/tls.c
parentc5cc32fe14ccbc19484202d20cf7d6bad45e3567 (diff)
um: merge os-Linux/tls.c into arch/x86/um/os-Linux/tls.c
it's i386-specific; moreover, analogs on other targets have incompatible interface - PTRACE_GET_THREAD_AREA does exist elsewhere, but struct user_desc does *not* Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux/tls.c')
-rw-r--r--arch/um/os-Linux/tls.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/um/os-Linux/tls.c b/arch/um/os-Linux/tls.c
deleted file mode 100644
index 73277801ef14..000000000000
--- a/arch/um/os-Linux/tls.c
+++ /dev/null
@@ -1,35 +0,0 @@
1#include <errno.h>
2#include <sys/ptrace.h>
3#include "sysdep/tls.h"
4
5/* TLS support - we basically rely on the host's one.*/
6
7#ifndef PTRACE_GET_THREAD_AREA
8#define PTRACE_GET_THREAD_AREA 25
9#endif
10
11#ifndef PTRACE_SET_THREAD_AREA
12#define PTRACE_SET_THREAD_AREA 26
13#endif
14
15int os_set_thread_area(user_desc_t *info, int pid)
16{
17 int ret;
18
19 ret = ptrace(PTRACE_SET_THREAD_AREA, pid, info->entry_number,
20 (unsigned long) info);
21 if (ret < 0)
22 ret = -errno;
23 return ret;
24}
25
26int os_get_thread_area(user_desc_t *info, int pid)
27{
28 int ret;
29
30 ret = ptrace(PTRACE_GET_THREAD_AREA, pid, info->entry_number,
31 (unsigned long) info);
32 if (ret < 0)
33 ret = -errno;
34 return ret;
35}