Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
0004  * Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0005  */
0006 
0007 #ifndef __ASM_STACKTRACE_H
0008 #define __ASM_STACKTRACE_H
0009 
0010 #include <linux/sched.h>
0011 
0012 /**
0013  * arc_unwind_core - Unwind the kernel mode stack for an execution context
0014  * @tsk:        NULL for current task, specific task otherwise
0015  * @regs:       pt_regs used to seed the unwinder {SP, FP, BLINK, PC}
0016  *          If NULL, use pt_regs of @tsk (if !NULL) otherwise
0017  *          use the current values of {SP, FP, BLINK, PC}
0018  * @consumer_fn:    Callback invoked for each frame unwound
0019  *          Returns 0 to continue unwinding, -1 to stop
0020  * @arg:        Arg to callback
0021  *
0022  * Returns the address of first function in stack
0023  *
0024  * Semantics:
0025  *  - synchronous unwinding (e.g. dump_stack): @tsk  NULL, @regs  NULL
0026  *  - Asynchronous unwinding of sleeping task: @tsk !NULL, @regs  NULL
0027  *  - Asynchronous unwinding of intr/excp etc: @tsk !NULL, @regs !NULL
0028  */
0029 notrace noinline unsigned int arc_unwind_core(
0030     struct task_struct *tsk, struct pt_regs *regs,
0031     int (*consumer_fn) (unsigned int, void *),
0032     void *arg);
0033 
0034 #endif /* __ASM_STACKTRACE_H */