stacktrace.h 592 字节
Newer Older
1 2 3 4 5 6 7
#ifndef __LINUX_STACKTRACE_H
#define __LINUX_STACKTRACE_H

#ifdef CONFIG_STACKTRACE
struct stack_trace {
	unsigned int nr_entries, max_entries;
	unsigned long *entries;
8 9
	int skip;	/* input argument: How many entries to skip */
	int all_contexts; /* input argument: if true do than one stack */
10 11 12
};

extern void save_stack_trace(struct stack_trace *trace,
13
			     struct task_struct *task);
14 15 16

extern void print_stack_trace(struct stack_trace *trace, int spaces);
#else
17
# define save_stack_trace(trace, task)			do { } while (0)
18 19 20 21
# define print_stack_trace(trace)			do { } while (0)
#endif

#endif