WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
osal_debug.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2022. All rights reserved.
3 * Description: OS Abstract Layer.
4 */
5
9#ifndef __OSAL_DEBUG_H__
10#define __OSAL_DEBUG_H__
11
12#ifdef __cplusplus
13#if __cplusplus
14extern "C" {
15#endif
16#endif
17
18#ifdef OSAL_DEBUG
19#define OSAL_BUG() \
20 do { \
21 } while (1)
22#else
23#define OSAL_BUG()
24#endif
25#define OSAL_ASSERT(expr) \
26 do { \
27 if (!(expr)) { \
28 osal_printk("\nASSERT failed at:\n" \
29 " >Condition: %s\n", \
30 #expr); \
31 OSAL_BUG(); \
32 } \
33 } while (0)
34
35
36#define OSAL_BUG_ON(expr) \
37 do { \
38 if (expr) { \
39 osal_printk("BUG: failure at %d/%s()!\n", __LINE__, __func__); \
40 OSAL_BUG(); \
41 } \
42 } while (0)
43
51void osal_printk(const char *fmt, ...);
52
64void osal_panic(const char *fmt, const char *fun, int line, const char *cond);
65
76void osal_dump_stack(void);
77
88void osal_bug_on(unsigned char condition);
89
100void osal_flush_cache(void);
101
102#ifdef __cplusplus
103#if __cplusplus
104}
105#endif
106#endif
107#endif /* __OSAL_DEBUG_H__ */
void osal_dump_stack(void)
Kernel backtrace function.
Definition osal_debug.c:18
void osal_flush_cache(void)
Kernel dcache flush function.
Definition osal_debug.c:45
void osal_bug_on(unsigned char condition)
Kernel panic function.
Definition osal_debug.c:7
void osal_panic(const char *fmt, const char *fun, int line, const char *cond)
Kernel panic function.
Definition osal_debug.c:23
void osal_printk(const char *fmt,...)
Log printing function.
Definition osal_debug.c:28