ucos代码阅读(6) 全局变量
来源:互联网 发布:复旦大学梁永安知乎 编辑:程序博客网 时间:2024/06/05 16:56
/*
*********************************************************************************************************
* GLOBAL VARIABLES(英文)
*********************************************************************************************************
*/
OS_EXT INT32U OSCtxSwCtr; /* Counter of number of context switches */
#if (OS_EVENT_EN) && (OS_MAX_EVENTS > 0)
OS_EXT OS_EVENT *OSEventFreeList; /* Pointer to list of free EVENT control blocks */
OS_EXT OS_EVENT OSEventTbl[OS_MAX_EVENTS];/* Table of EVENT control blocks */
#endif
#if (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
OS_EXT OS_FLAG_GRP OSFlagTbl[OS_MAX_FLAGS]; /* Table containing event flag groups */
OS_EXT OS_FLAG_GRP *OSFlagFreeList; /* Pointer to free list of event flag groups */
#endif
#if OS_TASK_STAT_EN > 0
OS_EXT INT8U OSCPUUsage; /* Percentage of CPU used */
OS_EXT INT32U OSIdleCtrMax; /* Max. value that idle ctr can take in 1 sec. */
OS_EXT INT32U OSIdleCtrRun; /* Val. reached by idle ctr at run time in 1 sec. */
OS_EXT BOOLEAN OSStatRdy; /* Flag indicating that the statistic task is rdy */
OS_EXT OS_STK OSTaskStatStk[OS_TASK_STAT_STK_SIZE]; /* Statistics task stack */
#endif
OS_EXT INT8U OSIntNesting; /* Interrupt nesting level */
OS_EXT INT8U OSLockNesting; /* Multitasking lock nesting level */
OS_EXT INT8U OSPrioCur; /* Priority of current task */
OS_EXT INT8U OSPrioHighRdy; /* Priority of highest priority task */
#if OS_LOWEST_PRIO <= 63
OS_EXT INT8U OSRdyGrp; /* Ready list group */
OS_EXT INT8U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run */
#else
OS_EXT INT16U OSRdyGrp; /* Ready list group */
OS_EXT INT16U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run */
#endif
OS_EXT BOOLEAN OSRunning; /* Flag indicating that kernel is running */
OS_EXT INT8U OSTaskCtr; /* Number of tasks created */
OS_EXT volatile INT32U OSIdleCtr; /* Idle counter */
OS_EXT OS_STK OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE]; /* Idle task stack */
OS_EXT OS_TCB *OSTCBCur; /* Pointer to currently running TCB */
OS_EXT OS_TCB *OSTCBFreeList; /* Pointer to list of free TCBs */
OS_EXT OS_TCB *OSTCBHighRdy; /* Pointer to highest priority TCB R-to-R */
OS_EXT OS_TCB *OSTCBList; /* Pointer to doubly linked list of TCBs */
OS_EXT OS_TCB *OSTCBPrioTbl[OS_LOWEST_PRIO + 1];/* Table of pointers to created TCBs */
OS_EXT OS_TCB OSTCBTbl[OS_MAX_TASKS + OS_N_SYS_TASKS]; /* Table of TCBs */
#if OS_TICK_STEP_EN > 0
OS_EXT INT8U OSTickStepState; /* Indicates the state of the tick step feature */
#endif
#if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
OS_EXT OS_MEM *OSMemFreeList; /* Pointer to free list of memory partitions */
OS_EXT OS_MEM OSMemTbl[OS_MAX_MEM_PART];/* Storage for memory partition manager */
#endif
#if (OS_Q_EN > 0) && (OS_MAX_QS > 0)
OS_EXT OS_Q *OSQFreeList; /* Pointer to list of free QUEUE control blocks */
OS_EXT OS_Q OSQTbl[OS_MAX_QS]; /* Table of QUEUE control blocks */
#endif
#if OS_TIME_GET_SET_EN > 0
OS_EXT volatile INT32U OSTime; /* Current value of system time (in ticks) */
#endif
#if OS_TMR_EN > 0
OS_EXT INT16U OSTmrFree; /* Number of free entries in the timer pool */
OS_EXT INT16U OSTmrUsed; /* Number of timers used */
OS_EXT INT32U OSTmrTime; /* Current timer time */
OS_EXT OS_EVENT *OSTmrSem; /* Sem. used to gain exclusive access to timers */
OS_EXT OS_EVENT *OSTmrSemSignal; /* Sem. used to signal the update of timers */
OS_EXT OS_TMR OSTmrTbl[OS_TMR_CFG_MAX]; /* Table containing pool of timers */
OS_EXT OS_TMR *OSTmrFreeList; /* Pointer to free list of timers */
OS_EXT OS_STK OSTmrTaskStk[OS_TASK_TMR_STK_SIZE];
OS_EXT OS_TMR_WHEEL OSTmrWheelTbl[OS_TMR_CFG_WHEEL_SIZE];
#endif
extern INT8U const OSUnMapTbl[256]; /* Priority->Index lookup table */
/*
*********************************************************************************************************
* GLOBAL VARIABLES(中文)
*********************************************************************************************************
*/
===================================================================================================================================
OS_EXT INT32U OSCtxSwCtr; /* Counter of number of context switches int型变量,上下文切换的次数 */
#if (OS_EVENT_EN) && (OS_MAX_EVENTS > 0)
OS_EXT OS_EVENT *OSEventFreeList; /* Pointer to list of free EVENT control blocks 指针,指向未分配的事件控制块 */
OS_EXT OS_EVENT OSEventTbl[OS_MAX_EVENTS];/* Table of EVENT control blocks 事件类型的数组,事件控制块表 */
#endif
#if (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
OS_EXT OS_FLAG_GRP OSFlagTbl[OS_MAX_FLAGS]; /* Table containing event flag groups 标志组类型的数组 事件标志组 */
OS_EXT OS_FLAG_GRP *OSFlagFreeList; /* Pointer to free list of event flag groups 指针,指针,指向未分配的标志组 */
#endif
#if OS_TASK_STAT_EN > 0
OS_EXT INT8U OSCPUUsage; /* Percentage of CPU used CPU 的使用率 */
OS_EXT INT32U OSIdleCtrMax; /* Max. value that idle ctr can take in 1 sec. 一秒钟idle的运行次数的最大值 */
OS_EXT INT32U OSIdleCtrRun; /* Val. reached by idle ctr at run time in 1 sec. */
OS_EXT BOOLEAN OSStatRdy; /* Flag indicating that the statistic task is rdy 标明统计任务已经进入就绪态 */
OS_EXT OS_STK OSTaskStatStk[OS_TASK_STAT_STK_SIZE]; /* Statistics task stack 统计任务的堆栈*/
#endif
OS_EXT INT8U OSIntNesting; /* Interrupt nesting level 中断的网级别 */
OS_EXT INT8U OSLockNesting; /* Multitasking lock nesting level 多任务的网锁*/
OS_EXT INT8U OSPrioCur; /* Priority of current task 当前任务的优先级*/
OS_EXT INT8U OSPrioHighRdy; /* Priority of highest priority task 就绪任务的最高优先级*/
#if OS_LOWEST_PRIO <= 63
OS_EXT INT8U OSRdyGrp; /* Ready list group 就绪的表组*/
OS_EXT INT8U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run 处在就绪态的任务 */
#else
OS_EXT INT16U OSRdyGrp; /* Ready list group */
OS_EXT INT16U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run */
#endif
OS_EXT BOOLEAN OSRunning; /* Flag indicating that kernel is running 标志标明内核在运行 */
OS_EXT INT8U OSTaskCtr; /* Number of tasks created 已经创建的任务的数量 */
OS_EXT volatile INT32U OSIdleCtr; /* Idle counter 执行空闲任务的次数 */
OS_EXT OS_STK OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE]; /* Idle task stack 空任务的堆栈 */
OS_EXT OS_TCB *OSTCBCur; /* Pointer to currently running TCB 当前运行的任务的TCB*/
OS_EXT OS_TCB *OSTCBFreeList; /* Pointer to list of free TCBs 指针,指向空闲的TCB链表*/
OS_EXT OS_TCB *OSTCBHighRdy; /* Pointer to highest priority TCB R-to-R 指针,指向优先级最高的任务的TCB*/
OS_EXT OS_TCB *OSTCBList; /* Pointer to doubly linked list of TCBs 指针,指向TCB双向链表*/
OS_EXT OS_TCB *OSTCBPrioTbl[OS_LOWEST_PRIO + 1];/* Table of pointers to created TCBs 指针,指向已经被创建的任务的TCB*/
OS_EXT OS_TCB OSTCBTbl[OS_MAX_TASKS + OS_N_SYS_TASKS]; /* Table of TCBs TCB类型的数组,TCB表*/
#if OS_TICK_STEP_EN > 0
OS_EXT INT8U OSTickStepState; /* Indicates the state of the tick step feature 表明 */
#endif
#if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
OS_EXT OS_MEM *OSMemFreeList; /* Pointer to free list of memory partitions */
OS_EXT OS_MEM OSMemTbl[OS_MAX_MEM_PART];/* Storage for memory partition manager */
#endif
#if (OS_Q_EN > 0) && (OS_MAX_QS > 0)
OS_EXT OS_Q *OSQFreeList; /* Pointer to list of free QUEUE control blocks 指针指向控制块队列 */
OS_EXT OS_Q OSQTbl[OS_MAX_QS]; /* Table of QUEUE control blocks 指针表*/
#endif
#if OS_TIME_GET_SET_EN > 0
OS_EXT volatile INT32U OSTime; /* Current value of system time (in ticks) 系统时间*/
#endif
#if OS_TMR_EN > 0
OS_EXT INT16U OSTmrFree; /* Number of free entries in the timer pool 未分配的定时器数目 */
OS_EXT INT16U OSTmrUsed; /* Number of timers used 已经使用 的定时器*/
OS_EXT INT32U OSTmrTime; /* Current timer time 当前定时器时间*/
OS_EXT OS_EVENT *OSTmrSem; /* Sem. used to gain exclusive access to timers */
OS_EXT OS_EVENT *OSTmrSemSignal; /* Sem. used to signal the update of timers 信号量用于更新定时器 */
OS_EXT OS_TMR OSTmrTbl[OS_TMR_CFG_MAX]; /* Table containing pool of timers 数组,定时器池 */
OS_EXT OS_TMR *OSTmrFreeList; /* Pointer to free list of timers 指针指向定时器链表*/
OS_EXT OS_STK OSTmrTaskStk[OS_TASK_TMR_STK_SIZE];
OS_EXT OS_TMR_WHEEL OSTmrWheelTbl[OS_TMR_CFG_WHEEL_SIZE];
#endif
extern INT8U const OSUnMapTbl[256]; /* Priority->Index lookup table */
其中红色的是既有table,又有list的
- ucos代码阅读(6) 全局变量
- ucos代码阅读(2)
- ucos代码阅读(3)
- ucos代码阅读(4)
- ucos代码阅读(5)
- ucos代码阅读(8)
- ucos代码阅读(9)
- ucos代码阅读(1)
- ucos全局变量
- ucos中的全局变量
- 阅读程序(2)---全局变量
- ucos中如何定义全局变量
- ucos II 任务间 通信之一:全局变量
- 关于ucos全局变量定义的问题
- ucos II 任务间 通信之一:全局变量
- 深入uCOS中全局变量的使用详解
- ucos代码裁剪
- ucos代码裁剪
- 手持设备电池电量检测(0)
- gcc提供的原子操作
- 12.GridView显示隐藏某一列:
- 【轻松一刻】那些让我们惊叹不已的唯美GIF动态图片
- 工作流引擎 jBPM
- ucos代码阅读(6) 全局变量
- 13.GridView弹出新页面/弹出制定大小位置新窗口:
- html5
- android 修改/default.prop的只读属性
- Java序列化高级认识
- 记住短信报警号码:12110
- IMSI、IMEI和MEID(ESN)
- 14.GridView固定表头(不用javascript只用CSS!,很好用):
- java导出excel