Merge branch 'devel' into for-linus
[linux-2.6-block.git] / include / linux / stacktrace.h
CommitLineData
8637c099
IM
1#ifndef __LINUX_STACKTRACE_H
2#define __LINUX_STACKTRACE_H
3
897312bd
AM
4struct task_struct;
5
8637c099
IM
6#ifdef CONFIG_STACKTRACE
7struct stack_trace {
8 unsigned int nr_entries, max_entries;
9 unsigned long *entries;
5a1b3999 10 int skip; /* input argument: How many entries to skip */
8637c099
IM
11};
12
ab1b6f03 13extern void save_stack_trace(struct stack_trace *trace);
9745512c
AV
14extern void save_stack_trace_tsk(struct task_struct *tsk,
15 struct stack_trace *trace);
8637c099
IM
16
17extern void print_stack_trace(struct stack_trace *trace, int spaces);
02b67518 18
8d26487f 19#ifdef CONFIG_USER_STACKTRACE_SUPPORT
02b67518
TE
20extern void save_stack_trace_user(struct stack_trace *trace);
21#else
22# define save_stack_trace_user(trace) do { } while (0)
23#endif
24
8637c099 25#else
ab1b6f03 26# define save_stack_trace(trace) do { } while (0)
9745512c 27# define save_stack_trace_tsk(tsk, trace) do { } while (0)
8d7c6a96 28# define save_stack_trace_user(trace) do { } while (0)
3b5ad079 29# define print_stack_trace(trace, spaces) do { } while (0)
8637c099
IM
30#endif
31
32#endif