4c9e138513
Formatting changes in the files which have been changed in the tt-removal patchset so far. These include: copyright updates header file trimming style fixes adding severity to printks indenting Kconfig help according to the predominant kernel style These changes should be entirely non-functional. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
36 lines
676 B
C
36 lines
676 B
C
#include <errno.h>
|
|
#include <sys/ptrace.h>
|
|
#include "sysdep/tls.h"
|
|
|
|
/* TLS support - we basically rely on the host's one.*/
|
|
|
|
#ifndef PTRACE_GET_THREAD_AREA
|
|
#define PTRACE_GET_THREAD_AREA 25
|
|
#endif
|
|
|
|
#ifndef PTRACE_SET_THREAD_AREA
|
|
#define PTRACE_SET_THREAD_AREA 26
|
|
#endif
|
|
|
|
int os_set_thread_area(user_desc_t *info, int pid)
|
|
{
|
|
int ret;
|
|
|
|
ret = ptrace(PTRACE_SET_THREAD_AREA, pid, info->entry_number,
|
|
(unsigned long) info);
|
|
if (ret < 0)
|
|
ret = -errno;
|
|
return ret;
|
|
}
|
|
|
|
int os_get_thread_area(user_desc_t *info, int pid)
|
|
{
|
|
int ret;
|
|
|
|
ret = ptrace(PTRACE_GET_THREAD_AREA, pid, info->entry_number,
|
|
(unsigned long) info);
|
|
if (ret < 0)
|
|
ret = -errno;
|
|
return ret;
|
|
}
|