⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_tcb.h.svn-base

📁 我们自己开发的一个OSEK操作系统!不知道可不可以?
💻 SVN-BASE
字号:

#ifndef __OS_TCB_H__
#define __OS_TCB_H__

#include "OS_CPU.h"

/*********************************************************************************************************
*                                          TASK CONTROL BLOCK
*********************************************************************************************************
*/


typedef struct os_tcb {
    OS_STK          *OSTCBStkPtr;      /* Pointer to current top of stack                              */

                                 
    INT32U           OSTCBStkSize;     /* Size of task stack (in number of stack elements)             */
                 
    INT8U            id;          /* Task ID (0..65535)                                           */


    struct os_tcb   *OSTCBNext;        /* Pointer to next     TCB in the TCB list                      */
    struct os_tcb   *OSTCBPrev;        /* Pointer to previous TCB in the TCB list                      */


#if (CC==BCC2)||(CC==ECC2)
    struct os_tcb   *RdyNext;        
    struct os_tcb   *RdyPrev;  
    /*about Event*/
    INT8U   Set;
    INT8U   Wait;  
    
#endif
   /*about Resource*/
    INT8U            ResourceNesting;  /*         the number of resource accessed nestly         */
    INT8U            InternalRes;      /*         the index of Internal Resource in RCBArray       */
    INT8U            ResCnt;           /*         the number of Resources the task needed */         
    INT8U *          ResNestingArray;  /*         the resource ID is queued in the array when been accessed, and dequeued when leaved*/
   
    INT8U            state;        /* Task      status                                             */
    
    INT8U            prio;      

    INT8U            OSTCBX;           /* Bit position in group  corresponding to task priority        */
    INT8U            OSTCBY;           /* Index into ready table corresponding to task priority        */

    INT8U            OSTCBBitX;        /* Bit mask to access bit position in ready table               */
    INT8U            OSTCBBitY;        /* Bit mask to access bit position in ready group               */

   INT8U              schedpcy;
   INT8U              taskclass;
   INT8U		 autoact;
   
} OS_TCB;

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -