aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ptrace.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/ptrace.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/ptrace.h')
-rw-r--r--include/linux/ptrace.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 4272521e29e9..9178d5cc0b01 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -100,15 +100,14 @@
100#include <linux/sched.h> /* For struct task_struct. */ 100#include <linux/sched.h> /* For struct task_struct. */
101 101
102 102
103extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); 103extern long arch_ptrace(struct task_struct *child, long request,
104extern int ptrace_traceme(void); 104 unsigned long addr, unsigned long data);
105extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); 105extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
106extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); 106extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
107extern int ptrace_attach(struct task_struct *tsk);
108extern int ptrace_detach(struct task_struct *, unsigned int);
109extern void ptrace_disable(struct task_struct *); 107extern void ptrace_disable(struct task_struct *);
110extern int ptrace_check_attach(struct task_struct *task, int kill); 108extern int ptrace_check_attach(struct task_struct *task, int kill);
111extern int ptrace_request(struct task_struct *child, long request, long addr, long data); 109extern int ptrace_request(struct task_struct *child, long request,
110 unsigned long addr, unsigned long data);
112extern void ptrace_notify(int exit_code); 111extern void ptrace_notify(int exit_code);
113extern void __ptrace_link(struct task_struct *child, 112extern void __ptrace_link(struct task_struct *child,
114 struct task_struct *new_parent); 113 struct task_struct *new_parent);
@@ -132,8 +131,10 @@ static inline void ptrace_unlink(struct task_struct *child)
132 __ptrace_unlink(child); 131 __ptrace_unlink(child);
133} 132}
134 133
135int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data); 134int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
136int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data); 135 unsigned long data);
136int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
137 unsigned long data);
137 138
138/** 139/**
139 * task_ptrace - return %PT_* flags that apply to a task 140 * task_ptrace - return %PT_* flags that apply to a task
@@ -188,6 +189,10 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
188 child->ptrace = current->ptrace; 189 child->ptrace = current->ptrace;
189 __ptrace_link(child, current->parent); 190 __ptrace_link(child, current->parent);
190 } 191 }
192
193#ifdef CONFIG_HAVE_HW_BREAKPOINT
194 atomic_set(&child->ptrace_bp_refcnt, 1);
195#endif
191} 196}
192 197
193/** 198/**
@@ -349,6 +354,13 @@ extern int task_current_syscall(struct task_struct *target, long *callno,
349 unsigned long args[6], unsigned int maxargs, 354 unsigned long args[6], unsigned int maxargs,
350 unsigned long *sp, unsigned long *pc); 355 unsigned long *sp, unsigned long *pc);
351 356
352#endif 357#ifdef CONFIG_HAVE_HW_BREAKPOINT
358extern int ptrace_get_breakpoints(struct task_struct *tsk);
359extern void ptrace_put_breakpoints(struct task_struct *tsk);
360#else
361static inline void ptrace_put_breakpoints(struct task_struct *tsk) { }
362#endif /* CONFIG_HAVE_HW_BREAKPOINT */
363
364#endif /* __KERNEL */
353 365
354#endif 366#endif