WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
dfx_os_st.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.
3 * Description: dfx os st
4 * This file should be changed only infrequently and with great care.
5 */
6
7#ifndef DFX_OS_ST_H
8#define DFX_OS_ST_H
9#include <stdint.h>
10#include <stdbool.h>
11
12#define EXT_OS_STAT_MSG_WAIT_FAIL 0x1 /* Used in the interrupt context.CNcomment:中断上下文使用CNend */
13#define EXT_OS_STAT_MSG_SEND_FAIL 0x2 /* The timeout period of the interrupt context configuration is not 0,
14 and the queue is full.CNcomment:中断上下文配置超时时间不为0, 队列满 CNend */
15#define EXT_OS_STAT_SEM_WAIT_FAIL 0x4 /* Used in the interrupt context.CNcomment:中断上下文使用CNend */
16#define EXT_OS_STAT_SEM_SIGNAL_FAIL 0x8 /* Repeated release.CNcomment:重复释放CNend */
17#define EXT_OS_STAT_MUX_PEND_FAIL 0x10 /* Used in the interrupt context.CNcomment:中断上下文使用CNend */
18#define EXT_OS_STAT_MUX_POST_FAIL 0x20 /* Cross-task use, not created.CNcomment:跨任务使用,未创建CNend */
19#define EXT_OS_STAT_EVENT_WAIT_FAIL 0x40 /* Used in the interrupt context.CNcomment:中断上下文使用 CNend */
20#define EXT_OS_STAT_EVENT_SEND_FAIL 0x80 /* Initialized EVT resources used up.
21 CNcomment:初始化EVT资源已经用完 CNend */
22#define EXT_OS_STAT_EVENT_CLR_FAIL 0x100 /* Invalid input argument.CNcomment:入参错误 CNend */
23#define EXT_OS_STAT_SLEEP_FAIL 0x200 /* Used in the interrupt context.CNcomment:中断上下文使用CNend */
24#define EXT_OS_STAT_START_TIMER_FAIL 0x400 /* Invalid input argument.CNcomment:入参错误 CNend */
25#define EXT_OS_STAT_CREATE_TIMER_FAIL 0x800 /* WorkQueue used up.CNcomment:创建定时器句柄失败 CNend */
27#define DFX_TASK_NAME_LEN 32
28typedef struct {
29 char name[DFX_TASK_NAME_LEN]; /* Task entrance function.CNcomment:入口函数CNend */
30 bool valid;
31 uint32_t id; /* Task ID.CNcomment:任务ID CNend */
32 uint16_t status; /* Task status. Status detail see los_task_pri.h.CNcomment:任务状态。
33 详细状态码请参考los_task_pri.h CNend */
34 uint16_t priority; /* Task priority.CNcomment:任务优先级 CNend */
35 void *task_sem; /* Semaphore pointer.CNcomment:信号量指针CNend */
36 void *task_mutex; /* Mutex pointer.CNcomment:互斥锁指针CNend */
37 uint32_t event_stru[3]; /* Event: 3 nums.CNcomment:3个事件CNend */
38 uint32_t event_mask; /* Event mask.CNcomment:事件掩码CNend */
39 uint32_t stack_size; /* Task stack size.CNcomment:栈大小CNend */
40 uint32_t top_of_stack; /* Task stack top.CNcomment:栈顶CNend */
41 uint32_t bottom_of_stack; /* Task stack bottom.CNcomment:栈底CNend */
42 uint32_t sp; /* Task SP pointer.CNcomment:当前SP.CNend */
43 uint32_t curr_used; /* Current task stack usage.CNcomment:当前任务栈使用率CNend */
44 uint32_t peak_used; /* Task stack usage peak.CNcomment:栈使用峰值CNend */
45 uint32_t overflow_flag; /* Flag that indicates whether a task stack overflow occurs.
46 CNcomment:栈溢出标记位CNend */
48
53typedef struct {
54 uint8_t timer_usage; /* Number of used system timers.CNcomment:当前使用系统定时器个数 CNend */
55 uint8_t task_usage; /* Number of used tasks.CNcomment:当前使用任务个数 CNend */
56 uint8_t sem_usage; /* Number of used semaphores.CNcomment:当前使用信号量个数 CNend */
57 uint8_t queue_usage; /* Number of used message queues.CNcomment:当前使用消息队列个数 CNend */
58 uint8_t mux_usage; /* Number of used mutexes.CNcomment:当前使用互斥锁个数 CNend */
59 uint8_t event_usage; /* Number of used events.CNcomment:当前使用事件个数 CNend */
60 uint16_t err_info; /* Error statistic EXT_OS_STAT_XXX, used to log occurred errors.
61 CNcomment:错误统计量EXT_OS_STAT_XXX,用于记录曾经出现过的错误 CNend */
64typedef struct {
65 uint32_t total; /* Total space of the memory pool (unit: byte).
66 CNcomment:内存池总大小(单位:byte)CNend */
67 uint32_t used; /* Used space of the memory pool (unit: byte).
68 CNcomment:内存池已经使用大小(单位:byte)CNend */
69 uint32_t free; /* Free space of the memory pool (unit: byte).
70 CNcomment:内存池剩余空间(单位:byte)CNend */
71 uint32_t free_node_num; /* Number of free nodes in the memory pool.
72 CNcomment:内存池剩余空间节点个数 CNend */
73 uint32_t used_node_num; /* Number of used nodes in the memory pool.
74 CNcomment:内存池已经使用的节点个数 CNend */
75 uint32_t max_free_node_size; /* Maximum size of the node in the free space of the memory pool (unit: byte).
76 CNcomment:内存池剩余空间节点中最大节点的大小(单位:byte)CNend */
77 uint32_t peek_size; /* Peak memory usage of the memory pool.CNcomment:内存池使用峰值CNend */
80typedef struct {
81 uint32_t display_mode;
82 uint32_t clear_flag;
83 uint32_t int_flag;
86typedef struct {
88 uint32_t id;
89 uint32_t usage;
92typedef struct {
93 uint8_t valid : 1;
94 uint8_t task : 1;
95 uint8_t pad0 : 6;
96 uint8_t id;
97 uint16_t pad1;
98 uint32_t permillage;
101typedef struct {
102 uint16_t status;
103 uint32_t usage;
106typedef struct {
107 uint8_t timer_usage; /* Number of used system timers. */
108 uint8_t task_usage; /* Number of used tasks. */
109 uint8_t sem_usage; /* Number of used semaphores. */
110 uint8_t queue_usage; /* Number of used message queues. */
111 uint8_t mux_usage; /* Number of used mutexes. */
113
114#endif
#define DFX_TASK_NAME_LEN
Definition dfx_os_st.h:25
static osal_u32 used
Definition hmac_11k.h:542
void free(void *addr)
释放动态内存,需要调用uapi_register_malloc接口先注册后才能使用。
Definition malloc.c:68
Definition dfx_os_st.h:90
Definition dfx_os_st.h:84
Definition dfx_os_st.h:99
Definition dfx_os_st.h:78
Definition dfx_os_st.h:62
Definition dfx_os_st.h:51
Definition dfx_os_st.h:104
Definition dfx_os_st.h:26