1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*-
3  * Copyright (c) 2015-2019 Linaro Limited
4  * Copyright (c) 2020, Huawei Technologies Co., Ltd
5  */
6 
7 #ifndef KERNEL_UNWIND
8 #define KERNEL_UNWIND
9 
10 #include <types_ext.h>
11 
12 #if defined(CFG_UNWIND) && (TRACE_LEVEL > 0)
13 void print_kernel_stack(void);
14 #else
print_kernel_stack(void)15 static inline void print_kernel_stack(void)
16 {
17 }
18 #endif
19 
20 #ifdef CFG_UNWIND
21 /* Get current call stack as an array allocated on the heap */
22 vaddr_t *unw_get_kernel_stack(void);
23 #else
unw_get_kernel_stack(void)24 static inline void *unw_get_kernel_stack(void)
25 {
26 	return NULL;
27 }
28 #endif /* CFG_UNWIND  */
29 
30 #endif /*KERNEL_UNWIND*/
31