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

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

?? os_core.c

?? ucos-II在S3C44BO下的移植
?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最近日韩中文字幕| 日韩国产精品久久| 7878成人国产在线观看| 国产在线精品一区二区| 亚洲麻豆国产自偷在线| 精品国产精品网麻豆系列| 在线观看成人免费视频| 福利视频网站一区二区三区| 美国欧美日韩国产在线播放| 一区二区三区在线观看动漫 | 日韩欧美一区中文| av在线播放成人| 国内成人自拍视频| 五月婷婷久久综合| 亚洲麻豆国产自偷在线| 国产女同互慰高潮91漫画| 日韩欧美国产麻豆| 欧美日韩国产色站一区二区三区| thepron国产精品| 国产麻豆精品一区二区| 麻豆一区二区在线| 日本视频中文字幕一区二区三区| 专区另类欧美日韩| 日韩一区欧美一区| 亚洲欧洲国产日韩| 中文字幕免费不卡在线| 国产亚洲va综合人人澡精品 | 色婷婷综合久久| 成人午夜私人影院| 国产一区二区三区视频在线播放| 三级欧美在线一区| 同产精品九九九| 国产精品一级片| 欧美中文字幕一区| 99久久精品国产网站| 成人午夜电影网站| 国产盗摄女厕一区二区三区| 国产一区三区三区| 国产一区二区三区高清播放| 国产伦精品一区二区三区免费| 久久精品国产亚洲高清剧情介绍| 日韩激情av在线| 日韩av电影免费观看高清完整版| 午夜欧美视频在线观看| 视频精品一区二区| 麻豆91小视频| 国产精品资源网站| 成人深夜在线观看| 99九九99九九九视频精品| 91蝌蚪porny九色| 色激情天天射综合网| 欧美怡红院视频| 欧美日本一区二区三区| 日韩欧美自拍偷拍| 久久精品一级爱片| 国产精品视频第一区| 亚洲视频网在线直播| 一区二区三区在线视频观看| 日韩和的一区二区| 精品亚洲免费视频| 成人黄页在线观看| 91高清视频在线| 欧美一区二区精品久久911| 欧美大胆人体bbbb| 中文字幕成人在线观看| 夜夜爽夜夜爽精品视频| 视频一区二区国产| 国产精品69毛片高清亚洲| 99re成人在线| 欧美一区二区精品| 国产午夜精品一区二区三区视频| 亚洲欧美激情在线| 日本sm残虐另类| 国产aⅴ精品一区二区三区色成熟| 色婷婷激情综合| 日韩欧美一区中文| 亚洲欧美日韩久久| 秋霞电影网一区二区| 波多野结衣欧美| 8v天堂国产在线一区二区| 国产日韩欧美综合在线| 亚洲成人资源在线| 成人h精品动漫一区二区三区| 欧美色区777第一页| 精品成人一区二区| 一区二区三区在线免费视频| 韩国女主播成人在线观看| 91片在线免费观看| 精品久久久三级丝袜| 亚洲色图丝袜美腿| 国产一区二区女| 欧美午夜精品一区二区三区| 国产色婷婷亚洲99精品小说| 亚洲香肠在线观看| 国产成人鲁色资源国产91色综| 91久久精品一区二区三| 国产片一区二区| 秋霞成人午夜伦在线观看| 91老师国产黑色丝袜在线| 久久久精品欧美丰满| 午夜国产精品一区| 91蝌蚪porny九色| 国产欧美日本一区二区三区| 日本欧美肥老太交大片| 欧美主播一区二区三区美女| 欧美国产日韩a欧美在线观看| 日本视频一区二区| 一本久久综合亚洲鲁鲁五月天| 久久久久久久一区| 免费在线观看视频一区| 在线区一区二视频| 综合婷婷亚洲小说| 粉嫩av一区二区三区粉嫩| 精品久久国产老人久久综合| 亚洲国产精品自拍| 日本韩国欧美一区| 中文字幕日本乱码精品影院| 国产精品影视天天线| 欧美一卡二卡在线观看| 性久久久久久久久久久久| 日本精品免费观看高清观看| 日本一区二区久久| 国产福利视频一区二区三区| 精品欧美乱码久久久久久1区2区 | 国产日韩欧美高清| 国产一区二区成人久久免费影院| 91精品国产一区二区人妖| 亚洲一区二区三区小说| 色天天综合久久久久综合片| 亚洲欧洲av另类| 91小视频在线观看| 亚洲视频每日更新| 日本高清无吗v一区| 一区二区三区欧美激情| 色偷偷久久一区二区三区| 亚洲激情成人在线| 欧美日韩国产成人在线91| 亚洲福利国产精品| 欧美精品一二三四| 蜜桃视频在线观看一区二区| 精品国产91九色蝌蚪| 精品无人区卡一卡二卡三乱码免费卡 | 日韩一区二区三区三四区视频在线观看 | 99久久国产综合精品色伊| 中文字幕一区二区三区蜜月| 91蝌蚪porny| 亚洲国产精品久久人人爱| 欧美三级韩国三级日本一级| 夜夜嗨av一区二区三区| 欧美日韩一区二区三区四区| 天天av天天翘天天综合网 | 色诱视频网站一区| 一区二区三区资源| 欧美三级视频在线播放| 午夜精品一区在线观看| 欧美军同video69gay| 麻豆91在线看| 中文字幕乱码久久午夜不卡 | 中文字幕一区二区三区视频| 91在线国产福利| 一区二区日韩电影| 91精品国产免费| 国产精品正在播放| 亚洲欧美一区二区在线观看| 在线观看视频一区二区欧美日韩| 亚洲二区视频在线| 欧美成人a∨高清免费观看| 国产91精品精华液一区二区三区 | 日韩影院精彩在线| 日韩欧美不卡一区| 成人app网站| 亚洲国产另类精品专区| 26uuu精品一区二区三区四区在线| 成人精品免费看| 亚洲成在人线免费| 久久影院电视剧免费观看| 色爱区综合激月婷婷| 蜜桃av一区二区三区电影| 中文字幕在线观看一区| 欧美久久久久久蜜桃| 国产·精品毛片| 亚洲va在线va天堂| 国产精品情趣视频| 91精品在线免费观看| gogogo免费视频观看亚洲一| 日韩国产欧美在线观看| 中文字幕中文在线不卡住| 欧美一区二区日韩| 色综合久久九月婷婷色综合| 日韩高清一级片| 亚洲少妇屁股交4| 精品国产免费久久| 欧美亚男人的天堂| 丁香婷婷深情五月亚洲| 日韩福利电影在线| 亚洲一区视频在线| 中文字幕亚洲视频| 2022国产精品视频| 欧美疯狂做受xxxx富婆| 99re这里只有精品首页|