]> err.no Git - linux-2.6/blob - arch/um/sys-i386/ptrace_user.c
uml: remove sysdep/thread.h
[linux-2.6] / arch / um / sys-i386 / ptrace_user.c
1 /*
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #include <stdio.h>
7 #include <stddef.h>
8 #include <errno.h>
9 #include <unistd.h>
10 #include "ptrace_user.h"
11 /* Grr, asm/user.h includes asm/ptrace.h, so has to follow ptrace_user.h */
12 #include <asm/user.h>
13 #include "kern_util.h"
14 #include "user.h"
15 #include "os.h"
16 #include "uml-config.h"
17
18 int ptrace_getregs(long pid, unsigned long *regs_out)
19 {
20         if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
21                 return -errno;
22         return 0;
23 }
24
25 int ptrace_setregs(long pid, unsigned long *regs)
26 {
27         if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
28                 return -errno;
29         return 0;
30 }
31
32 int ptrace_getfpregs(long pid, unsigned long *regs)
33 {
34         if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
35                 return -errno;
36         return 0;
37 }
38
39 int ptrace_setfpregs(long pid, unsigned long *regs)
40 {
41         if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
42                 return -errno;
43         return 0;
44 }