亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? os_core.c

?? 把UCOS2移植到TMS320L2812上
?? C
?? 第 1 頁 / 共 3 頁
字號:
    OSMemInit();                                           /* Initialize the memory manager            */
#endif    

#if OS_STK_GROWTH == 1
    #if OS_TASK_CREATE_EXT_EN
    OSTaskCreateExt(OSTaskIdle, 
                    (void *)0,                                 /* No arguments passed to OSTaskIdle()  */
                    &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Top-Of-Stack                     */
                    OS_IDLE_PRIO,                              /* Lowest priority level                */
                    OS_TASK_IDLE_ID,
                    &OSTaskIdleStk[0],                         /* Set Bottom-Of-Stack                  */
                    OS_TASK_IDLE_STK_SIZE, 
                    (void *)0,                                 /* No TCB extension                     */
                    OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */
    #else
    OSTaskCreate(OSTaskIdle, (void *)0, &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], OS_IDLE_PRIO);
    #endif
#else
    #if OS_TASK_CREATE_EXT_EN
    OSTaskCreateExt(OSTaskIdle, 
                    (void *)0,                                 /* No arguments passed to OSTaskIdle()  */
                    &OSTaskIdleStk[0],                         /* Set Top-Of-Stack                     */
                    OS_IDLE_PRIO,                              /* Lowest priority level                */
                    OS_TASK_IDLE_ID,
                    &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Bottom-Of-Stack                  */
                    OS_TASK_IDLE_STK_SIZE, 
                    (void *)0,                                 /* No TCB extension                     */
                    OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */
    #else
    OSTaskCreate(OSTaskIdle, (void *)0, &OSTaskIdleStk[0], OS_IDLE_PRIO);
    #endif
#endif

#if OS_TASK_STAT_EN 
    #if OS_TASK_CREATE_EXT_EN
        #if OS_STK_GROWTH == 1
        OSTaskCreateExt(OSTaskStat, 
                        (void *)0,                                /* No args passed to OSTaskStat()    */
                        &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],/* Set Top-Of-Stack                  */
                        OS_STAT_PRIO,                             /* One higher than the idle task     */
                        OS_TASK_STAT_ID,
                        &OSTaskStatStk[0],                        /* Set Bottom-Of-Stack               */
                        OS_TASK_STAT_STK_SIZE, 
                        (void *)0,                                /* No TCB extension                  */
                        OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);  /* Enable stack checking + clear  */
        #else
        OSTaskCreateExt(OSTaskStat, 
                        (void *)0,                                /* No args passed to OSTaskStat()    */
                        &OSTaskStatStk[0],                        /* Set Top-Of-Stack                  */
                        OS_STAT_PRIO,                             /* One higher than the idle task     */
                        OS_TASK_STAT_ID,
                        &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],/* Set Bottom-Of-Stack               */
                        OS_TASK_STAT_STK_SIZE, 
                        (void *)0,                                /* No TCB extension                  */
                        OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);  /* Enable stack checking + clear  */
        #endif
    #else
        #if OS_STK_GROWTH == 1
        OSTaskCreate(OSTaskStat, 
                     (void *)0,                                   /* No args passed to OSTaskStat()    */
                     &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],   /* Set Top-Of-Stack                  */
                     OS_STAT_PRIO);                               /* One higher than the idle task     */
        #else
        OSTaskCreate(OSTaskStat, 
                     (void *)0,                                   /* No args passed to OSTaskStat()    */
                     &OSTaskStatStk[0],                           /* Set Top-Of-Stack                  */
                     OS_STAT_PRIO);                               /* One higher than the idle task     */
        #endif
    #endif
#endif
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                              ENTER ISR
*
* Description: This function is used to notify uC/OS-II that you are about to service an interrupt
*              service routine (ISR).  This allows uC/OS-II to keep track of interrupt nesting and thus
*              only perform rescheduling at the last nested ISR.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) Your ISR can directly increment OSIntNesting without calling this function because 
*                 OSIntNesting has been declared 'global'.  You MUST, however, be sure that the increment
*                 is performed 'indivisibly' by your processor to ensure proper access to this critical
*                 resource.
*              2) You MUST still call OSIntExit() even though you increment OSIntNesting directly.
*              3) You MUST invoke OSIntEnter() and OSIntExit() in pair.  In other words, for every call
*                 to OSIntEnter() at the beginning of the ISR you MUST have a call to OSIntExit() at the
*                 end of the ISR.
*********************************************************************************************************
*/

void OSIntEnter (void)
{
    OS_ENTER_CRITICAL();
    OSIntNesting++;                              /* Increment ISR nesting level                        */
    OS_EXIT_CRITICAL();
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                               EXIT ISR
*
* Description: This function is used to notify uC/OS-II that you have completed serviving an ISR.  When 
*              the last nested ISR has completed, uC/OS-II will call the scheduler to determine whether
*              a new, high-priority task, is ready to run.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSIntEnter() and OSIntExit() in pair.  In other words, for every call
*                 to OSIntEnter() at the beginning of the ISR you MUST have a call to OSIntExit() at the
*                 end of the ISR.
*              2) Rescheduling is prevented when the scheduler is locked (see OSSchedLock())
*********************************************************************************************************
*/

void OSIntExit (void)
{
    OS_ENTER_CRITICAL();
    if ((--OSIntNesting | OSLockNesting) == 0) { /* Reschedule only if all ISRs completed & not locked */
        OSIntExitY    = OSUnMapTbl[OSRdyGrp];
        OSPrioHighRdy = (INT8U)((OSIntExitY << 3) + OSUnMapTbl[OSRdyTbl[OSIntExitY]]);
        if (OSPrioHighRdy != OSPrioCur) {        /* No context switch if current task is highest ready */
            OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy];
            OSCtxSwCtr++;                        /* Keep track of the number of context switches       */
            OSIntCtxSw();                        /* Perform interrupt level context switch             */
        }
    }
    OS_EXIT_CRITICAL();
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                              SCHEDULER
*
* Description: This function is called by other uC/OS-II services to determine whether a new, high
*              priority task has been made ready to run.  This function is invoked by TASK level code
*              and is not used to reschedule tasks from ISRs (see OSIntExit() for ISR rescheduling).
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) This function is INTERNAL to uC/OS-II and your application should not call it.
*              2) Rescheduling is prevented when the scheduler is locked (see OSSchedLock())
*********************************************************************************************************
*/

void OSSched (void)
{
    INT8U y;


    OS_ENTER_CRITICAL();
    if ((OSLockNesting | OSIntNesting) == 0) {   /* Task scheduling must be enabled and not ISR level  */
        y             = OSUnMapTbl[OSRdyGrp];    /* Get pointer to highest priority task ready to run  */
        OSPrioHighRdy = (INT8U)((y << 3) + OSUnMapTbl[OSRdyTbl[y]]);
        if (OSPrioHighRdy != OSPrioCur) {         /* No context switch if current task is highest ready */
            OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy];
            OSCtxSwCtr++;                        /* Increment context switch counter                   */
            OS_TASK_SW();                        /* Perform a context switch                           */
        }
    }
    OS_EXIT_CRITICAL(); 
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                          PREVENT SCHEDULING
*
* Description: This function is used to prevent rescheduling to take place.  This allows your application
*              to prevent context switches until you are ready to permit context switching.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSSchedLock() and OSSchedUnlock() in pair.  In other words, for every 
*                 call to OSSchedLock() you MUST have a call to OSSchedUnlock().
*********************************************************************************************************
*/

void OSSchedLock (void)
{
    if (OSRunning == TRUE) {                     /* Make sure multitasking is running                  */
        OS_ENTER_CRITICAL();
        OSLockNesting++;                         /* Increment lock nesting level                       */
        OS_EXIT_CRITICAL();
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                          ENABLE SCHEDULING
*
* Description: This function is used to re-allow rescheduling.  
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSSchedLock() and OSSchedUnlock() in pair.  In other words, for every 
*                 call to OSSchedLock() you MUST have a call to OSSchedUnlock().
*********************************************************************************************************
*/

void OSSchedUnlock (void)
{
    if (OSRunning == TRUE) {                           /* Make sure multitasking is running            */
        OS_ENTER_CRITICAL();
        if (OSLockNesting > 0) {                       /* Do not decrement if already 0                */
            OSLockNesting--;                           /* Decrement lock nesting level                 */
            if ((OSLockNesting | OSIntNesting) == 0) { /* See if scheduling re-enabled and not an ISR  */
                OS_EXIT_CRITICAL();
                OSSched();                             /* See if a higher priority task is ready       */
            } else {
                OS_EXIT_CRITICAL();
            }
        } else {
            OS_EXIT_CRITICAL();
        }
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                          START MULTITASKING
*
* Description: This function is used to start the multitasking process which lets uC/OS-II manages the
*              task that you have created.  Before you can call OSStart(), you MUST have called OSInit()
*              and you MUST have created at least one task.
*
* Arguments  : none
*
* Returns    : none
*
* Note       : OSStartHighRdy() MUST:
*                 a) Call OSTaskSwHook() then,
*                 b) Set OSRunning to TRUE.
*********************************************************************************************************
*/

void OSStart (void)
{
    INT8U y;
    INT8U x;


    if (OSRunning == FALSE) {
        y             = OSUnMapTbl[OSRdyGrp];        /* Find highest priority's task priority number   */
        x             = OSUnMapTbl[OSRdyTbl[y]];
        OSPrioHighRdy = (INT8U)((y << 3) + x);
        OSPrioCur     = OSPrioHighRdy;
        OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy]; /* Point to highest priority task ready to run    */
        OSTCBCur      = OSTCBHighRdy;
        OSStartHighRdy();                            /* Execute target specific code to start task     */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        STATISTICS INITIALIZATION
*
* Description: This function is called by your application to establish CPU usage by first determining
*              how high a 32-bit counter would count to in 1 second if no other tasks were to execute
*              during that time.  CPU usage is then determined by a low priority task which keeps track
*              of this 32-bit counter every second but this time, with other tasks running.  CPU usage is
*              determined by:
*
*                                             OSIdleCtr
*                 CPU Usage (%) = 100 * (1 - ------------)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产麻豆国产自产在线 | 麻豆精品视频在线| 亚洲制服丝袜av| 亚洲午夜国产一区99re久久| 免费看欧美美女黄的网站| 国产精品一区二区在线播放 | 国产精品无圣光一区二区| 久久免费美女视频| 亚洲精品免费电影| 日本一道高清亚洲日美韩| 不卡高清视频专区| 在线成人免费观看| 中日韩免费视频中文字幕| 久久久久久久久久久久久夜| 亚洲另类在线一区| 日本女人一区二区三区| 一区二区三区中文字幕电影| 国产一区二区三区视频在线播放| 精品视频一区二区三区免费| 亚洲欧洲综合另类| 成人av网址在线| 国产亚洲欧美日韩日本| 麻豆国产精品视频| 欧美一区二区播放| 日本一道高清亚洲日美韩| 在线观看亚洲一区| 亚洲精品免费在线观看| 不卡的av电影| 国产精品久久久久久妇女6080| 国产毛片精品一区| 久久久久久久久久久久久女国产乱| 麻豆免费看一区二区三区| 欧美日韩亚洲高清一区二区| 亚洲最快最全在线视频| 欧美图区在线视频| 五月天激情综合网| 日韩一级黄色片| 日本91福利区| 久久久亚洲精品一区二区三区| 久久激五月天综合精品| 欧美成人性战久久| 国产大片一区二区| 中文字幕一区在线观看| 亚洲女同女同女同女同女同69| 欧美三级视频在线| 国产精品国产三级国产普通话蜜臀 | 精品噜噜噜噜久久久久久久久试看| 性做久久久久久免费观看| 欧美日韩1区2区| 麻豆精品国产传媒mv男同| 日韩免费看的电影| 国内偷窥港台综合视频在线播放| 久久亚洲精品国产精品紫薇| 国产精品一区二区在线播放 | 一区二区三区产品免费精品久久75| 色婷婷久久一区二区三区麻豆| 亚洲视频免费看| 欧美疯狂做受xxxx富婆| 久久er精品视频| 国产精品视频你懂的| 91国产免费观看| 老司机精品视频一区二区三区| 久久久777精品电影网影网| 成人午夜精品在线| 亚洲国产一区视频| 久久久亚洲精品一区二区三区| 一本一道波多野结衣一区二区| 五月婷婷激情综合| 国产人成亚洲第一网站在线播放| 91在线观看成人| 美女爽到高潮91| 中文字幕一区二区5566日韩| 欧美日本在线视频| 国产一区二区三区在线观看免费| 亚洲美女一区二区三区| 日韩一级免费观看| 欧美在线免费播放| 国产老肥熟一区二区三区| 一区二区三区四区视频精品免费| 欧美不卡激情三级在线观看| 91丝袜高跟美女视频| 免费的成人av| 亚洲一区二区五区| 中文字幕国产一区| 精品va天堂亚洲国产| 欧美丝袜自拍制服另类| 国产成人精品三级| 精品亚洲porn| 日本中文一区二区三区| 亚洲免费观看高清| 亚洲精品一区二区在线观看| 欧美伊人精品成人久久综合97| 成人一区二区三区视频在线观看| 青青草97国产精品免费观看| 亚洲男人的天堂在线观看| 国产校园另类小说区| 日韩欧美综合在线| 欧美午夜精品免费| 色综合天天综合网天天狠天天 | 粉嫩av一区二区三区在线播放| 香蕉影视欧美成人| 亚洲综合在线五月| 国产精品久线观看视频| 久久九九久精品国产免费直播| 欧美成人精品1314www| 欧美性大战久久久久久久蜜臀| www.日韩精品| 懂色av一区二区三区免费看| 国产在线不卡视频| 韩国一区二区三区| 精品一区二区在线观看| 蜜臀a∨国产成人精品| 日本va欧美va欧美va精品| 日韩av一区二区在线影视| 亚洲五码中文字幕| 午夜a成v人精品| 亚洲国产精品视频| 亚洲va天堂va国产va久| 亚洲一区二区三区免费视频| 一区二区在线看| 亚洲欧美成人一区二区三区| 中文字幕一区二区三区视频| 日韩毛片高清在线播放| 亚洲免费看黄网站| 亚洲小说春色综合另类电影| 亚洲va韩国va欧美va精品| 午夜激情久久久| 毛片一区二区三区| 国产精品一区二区在线看| 成人av免费在线观看| 91免费看片在线观看| 色激情天天射综合网| 在线成人小视频| 2023国产精品自拍| 国产精品对白交换视频| 亚洲国产精品综合小说图片区| 五月婷婷激情综合| 国模冰冰炮一区二区| 菠萝蜜视频在线观看一区| 日本韩国欧美三级| 欧美一区二区视频观看视频 | 色噜噜狠狠成人中文综合| 在线观看日韩国产| 欧美一二区视频| 国产精品美女一区二区在线观看| 亚洲欧美色综合| 蜜臂av日日欢夜夜爽一区| 国产麻豆精品在线| 在线精品国精品国产尤物884a| 8v天堂国产在线一区二区| 久久色在线观看| 亚洲影院免费观看| 韩国女主播成人在线| 91丨国产丨九色丨pron| 欧美一区二区三区四区五区| 欧美激情一区二区在线| 亚洲午夜激情av| 国产成人午夜高潮毛片| 欧美日韩亚洲综合在线| 国产欧美一区二区精品秋霞影院| 一二三区精品福利视频| 国产v日产∨综合v精品视频| 欧美无砖砖区免费| 国产视频亚洲色图| 日韩黄色小视频| 99久久综合色| 26uuu精品一区二区在线观看| 亚洲制服欧美中文字幕中文字幕| 国产乱淫av一区二区三区| 欧美日韩综合色| 亚洲日穴在线视频| 国产激情一区二区三区| 91精品国产入口在线| 亚洲精品免费在线播放| 国产成人av网站| 9191精品国产综合久久久久久 | 国产日韩三级在线| 日韩精品欧美精品| 欧美亚洲丝袜传媒另类| 国产精品―色哟哟| 精品一区二区在线播放| 8x8x8国产精品| 五月综合激情网| 欧美系列日韩一区| 一区二区三区在线观看网站| 成人自拍视频在线| 精品国产三级电影在线观看| 日韩精品亚洲专区| 欧美日韩一区二区三区不卡 | 成人av中文字幕| 欧美精品一区男女天堂| 久久99九九99精品| 精品卡一卡二卡三卡四在线| 亚洲成av人片观看| 欧美日韩一级二级| 午夜激情一区二区| 日韩视频免费直播| 另类人妖一区二区av| 日韩欧美的一区二区| 精品在线观看免费|