blk: rq_data_dir() should not return a boolean
[cris-mirror.git] / arch / um / include / asm / stacktrace.h
blob9a864328c67f54ff658ed878d5f6a78d641af9f2
1 #ifndef _ASM_UML_STACKTRACE_H
2 #define _ASM_UML_STACKTRACE_H
4 #include <linux/uaccess.h>
5 #include <linux/ptrace.h>
7 struct stack_frame {
8 struct stack_frame *next_frame;
9 unsigned long return_address;
12 struct stacktrace_ops {
13 void (*address)(void *data, unsigned long address, int reliable);
16 #ifdef CONFIG_FRAME_POINTER
17 static inline unsigned long
18 get_frame_pointer(struct task_struct *task, struct pt_regs *segv_regs)
20 if (!task || task == current)
21 return segv_regs ? PT_REGS_BP(segv_regs) : current_bp();
22 return KSTK_EBP(task);
24 #else
25 static inline unsigned long
26 get_frame_pointer(struct task_struct *task, struct pt_regs *segv_regs)
28 return 0;
30 #endif
32 static inline unsigned long
33 *get_stack_pointer(struct task_struct *task, struct pt_regs *segv_regs)
35 if (!task || task == current)
36 return segv_regs ? (unsigned long *)PT_REGS_SP(segv_regs) : current_sp();
37 return (unsigned long *)KSTK_ESP(task);
40 void dump_trace(struct task_struct *tsk, const struct stacktrace_ops *ops, void *data);
42 #endif /* _ASM_UML_STACKTRACE_H */