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

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

?? os_core.c

?? 移植到三星ARM S3c44b0 上的 ucosII源代碼
?? 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一区二区三区免费野_久草精品视频
日本一区二区视频在线观看| 国内精品伊人久久久久影院对白| 一区二区三区在线看| 日本成人在线不卡视频| www.成人网.com| 欧美成人免费网站| 亚洲成人中文在线| 91老师片黄在线观看| 国产亚洲欧美色| 麻豆91免费看| 91精品在线麻豆| 亚洲三级视频在线观看| 在线成人av影院| 亚洲精品综合在线| 不卡区在线中文字幕| 精品国产一区二区三区不卡| 日韩和欧美的一区| 欧美日韩精品一区二区天天拍小说 | 日本高清不卡在线观看| 国产色婷婷亚洲99精品小说| 免费黄网站欧美| 91精品婷婷国产综合久久| 亚洲资源在线观看| 在线免费一区三区| 亚洲综合精品久久| 欧美自拍偷拍午夜视频| 一区二区三区中文字幕| 99re成人精品视频| 国产精品灌醉下药二区| 不卡的av电影| 亚洲欧美偷拍三级| 91免费观看在线| 亚洲欧美色图小说| 日本韩国欧美在线| 亚洲1区2区3区4区| 制服丝袜成人动漫| 久久国产免费看| 亚洲精品一线二线三线| 国产专区欧美精品| 欧美国产精品久久| 99精品1区2区| 亚洲精品免费看| 欧美日韩二区三区| 狠狠色狠狠色综合| 中文字幕精品一区| 在线一区二区观看| 午夜精品一区二区三区免费视频 | 久久er99热精品一区二区| 精品国产乱码久久久久久浪潮| 美女诱惑一区二区| 国产欧美精品一区二区色综合| av福利精品导航| 国产精品情趣视频| 亚洲成人黄色影院| 欧美一区二区播放| 国产成人午夜视频| 亚洲黄色录像片| 91精品国产综合久久久久久久 | 国产精品第13页| 精品视频一区二区不卡| 理论片日本一区| 欧美高清在线视频| 欧美综合在线视频| 美美哒免费高清在线观看视频一区二区| 日韩免费视频一区| 成人黄色av电影| 男人的天堂亚洲一区| 中文天堂在线一区| 69堂精品视频| 国产**成人网毛片九色| 午夜欧美大尺度福利影院在线看| 久久人人爽人人爽| 色八戒一区二区三区| 国产原创一区二区| 亚洲狠狠爱一区二区三区| 久久人人超碰精品| 欧美男同性恋视频网站| 成人福利视频在线看| 天天操天天综合网| 亚洲免费视频中文字幕| 精品国产一区二区三区av性色 | 成人不卡免费av| 日韩高清中文字幕一区| 亚洲欧洲99久久| 久久久久综合网| 日韩欧美在线综合网| 欧美性大战久久| 成人激情免费视频| 久久精品国产成人一区二区三区 | 国产女人18毛片水真多成人如厕 | 欧美伊人久久久久久久久影院| 国产毛片一区二区| 麻豆一区二区99久久久久| 一区二区视频免费在线观看| 国产欧美日韩中文久久| 欧美成人vps| 欧美群妇大交群中文字幕| 99久久99久久精品免费看蜜桃| 国产麻豆9l精品三级站| 久久精品99国产精品| 日本中文字幕不卡| 亚洲无线码一区二区三区| 夜夜嗨av一区二区三区网页| 亚洲欧洲av另类| 中文字幕一区二区三区不卡| 国产女人18水真多18精品一级做| 精品少妇一区二区三区免费观看| 亚洲三级电影网站| 1000部国产精品成人观看| 国产性做久久久久久| 国产日本一区二区| 国产女人水真多18毛片18精品视频| 精品日韩在线一区| 欧美变态凌虐bdsm| 久久久国产精华| 国产女人18毛片水真多成人如厕 | 精品国精品自拍自在线| 91精品麻豆日日躁夜夜躁| 欧美一区二区三区日韩| 欧美一级爆毛片| 久久尤物电影视频在线观看| 国产欧美日韩久久| 椎名由奈av一区二区三区| 亚洲免费大片在线观看| 亚洲国产精品影院| 日精品一区二区| 激情国产一区二区 | 国产精品每日更新| 亚洲日本va午夜在线影院| 一区av在线播放| 亚洲丶国产丶欧美一区二区三区| 免费观看日韩电影| 国产黑丝在线一区二区三区| 成人黄动漫网站免费app| 色婷婷亚洲婷婷| 日韩久久精品一区| 久久久影院官网| 夜夜精品视频一区二区| 免费不卡在线观看| 成人高清免费观看| 欧美精品三级日韩久久| 久久精品一区二区三区不卡| 亚洲乱码中文字幕综合| 天天色综合天天| 成人丝袜视频网| 3751色影院一区二区三区| 国产欧美精品日韩区二区麻豆天美| 亚洲欧美一区二区三区极速播放| 亚洲国产成人av| 粉嫩绯色av一区二区在线观看| 欧美制服丝袜第一页| 精品国产一区二区三区四区四| 成人欧美一区二区三区视频网页| 天堂蜜桃91精品| 99久久精品国产麻豆演员表| 欧美一卡2卡三卡4卡5免费| 国产精品乱码一区二三区小蝌蚪| 亚洲午夜久久久久久久久电影院| 美国精品在线观看| 欧亚一区二区三区| 国产清纯在线一区二区www| 亚洲一区二区免费视频| 国产成人免费视频一区| 欧美另类一区二区三区| 亚洲欧洲日韩在线| 国产综合久久久久影院| 欧美精品一卡两卡| 一区二区三区日韩| 大胆亚洲人体视频| 精品久久一二三区| www.久久久久久久久| 欧美一级片在线观看| 一区二区三区欧美激情| 国产99久久久国产精品| 欧美一二三区精品| 亚洲国产欧美一区二区三区丁香婷| 国产91精品一区二区麻豆网站| 日韩一区二区在线观看| 亚洲成人一二三| 在线观看亚洲精品视频| 国产精品九色蝌蚪自拍| 国产成人精品综合在线观看| 日韩一级完整毛片| 亚洲综合激情网| 在线日韩av片| 亚洲精品乱码久久久久久日本蜜臀| 国产成人av影院| 久久久久久**毛片大全| 久久99精品国产91久久来源| 91精品国产福利在线观看| 五月婷婷另类国产| 91精品蜜臀在线一区尤物| 免费观看在线综合色| 91精品国产高清一区二区三区蜜臀| 午夜天堂影视香蕉久久| 欧美性猛交xxxxxxxx| 日韩有码一区二区三区| 欧美精品乱码久久久久久| 亚洲福利视频一区二区| 欧美日韩国产精选|