stacktrace.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
  3. * Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __ASM_STACKTRACE_H
  10. #define __ASM_STACKTRACE_H
  11. #include <linux/sched.h>
  12. /**
  13. * arc_unwind_core - Unwind the kernel mode stack for an execution context
  14. * @tsk: NULL for current task, specific task otherwise
  15. * @regs: pt_regs used to seed the unwinder {SP, FP, BLINK, PC}
  16. * If NULL, use pt_regs of @tsk (if !NULL) otherwise
  17. * use the current values of {SP, FP, BLINK, PC}
  18. * @consumer_fn: Callback invoked for each frame unwound
  19. * Returns 0 to continue unwinding, -1 to stop
  20. * @arg: Arg to callback
  21. *
  22. * Returns the address of first function in stack
  23. *
  24. * Semantics:
  25. * - synchronous unwinding (e.g. dump_stack): @tsk NULL, @regs NULL
  26. * - Asynchronous unwinding of sleeping task: @tsk !NULL, @regs NULL
  27. * - Asynchronous unwinding of intr/excp etc: @tsk !NULL, @regs !NULL
  28. */
  29. notrace noinline unsigned int arc_unwind_core(
  30. struct task_struct *tsk, struct pt_regs *regs,
  31. int (*consumer_fn) (unsigned int, void *),
  32. void *arg);
  33. #endif /* __ASM_STACKTRACE_H */