aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/tls.c')
-rw-r--r--arch/um/os-Linux/tls.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/arch/um/os-Linux/tls.c b/arch/um/os-Linux/tls.c
index 16215b990804..73277801ef14 100644
--- a/arch/um/os-Linux/tls.c
+++ b/arch/um/os-Linux/tls.c
@@ -1,18 +1,9 @@
1#include <errno.h> 1#include <errno.h>
2#include <unistd.h>
3#include <sys/ptrace.h> 2#include <sys/ptrace.h>
4#include <sys/syscall.h>
5#include <asm/ldt.h>
6#include "sysdep/tls.h" 3#include "sysdep/tls.h"
7#include "uml-config.h"
8 4
9/* TLS support - we basically rely on the host's one.*/ 5/* TLS support - we basically rely on the host's one.*/
10 6
11/* In TT mode, this should be called only by the tracing thread, and makes sense
12 * only for PTRACE_SET_THREAD_AREA. In SKAS mode, it's used normally.
13 *
14 */
15
16#ifndef PTRACE_GET_THREAD_AREA 7#ifndef PTRACE_GET_THREAD_AREA
17#define PTRACE_GET_THREAD_AREA 25 8#define PTRACE_GET_THREAD_AREA 25
18#endif 9#endif
@@ -32,8 +23,6 @@ int os_set_thread_area(user_desc_t *info, int pid)
32 return ret; 23 return ret;
33} 24}
34 25
35#ifdef UML_CONFIG_MODE_SKAS
36
37int os_get_thread_area(user_desc_t *info, int pid) 26int os_get_thread_area(user_desc_t *info, int pid)
38{ 27{
39 int ret; 28 int ret;
@@ -44,32 +33,3 @@ int os_get_thread_area(user_desc_t *info, int pid)
44 ret = -errno; 33 ret = -errno;
45 return ret; 34 return ret;
46} 35}
47
48#endif
49
50#ifdef UML_CONFIG_MODE_TT
51#include "linux/unistd.h"
52
53int do_set_thread_area_tt(user_desc_t *info)
54{
55 int ret;
56
57 ret = syscall(__NR_set_thread_area,info);
58 if (ret < 0) {
59 ret = -errno;
60 }
61 return ret;
62}
63
64int do_get_thread_area_tt(user_desc_t *info)
65{
66 int ret;
67
68 ret = syscall(__NR_get_thread_area,info);
69 if (ret < 0) {
70 ret = -errno;
71 }
72 return ret;
73}
74
75#endif /* UML_CONFIG_MODE_TT */