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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? os_core.c

?? ucos porting source for Am188
?? 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 - ------------)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成a人片国产精品| 亚洲一区二区3| 天天av天天翘天天综合网色鬼国产| av网站一区二区三区| 国产精品你懂的| 91蜜桃在线观看| 亚洲电影你懂得| 日韩欧美色综合网站| 国产一区二区不卡老阿姨| 国产日韩av一区二区| 97久久精品人人做人人爽50路| 中文字幕日韩一区| 欧美网站一区二区| 捆绑调教美女网站视频一区| 久久久久高清精品| 91一区二区三区在线观看| 亚洲国产视频a| 精品国产乱子伦一区| a在线欧美一区| 亚洲成年人网站在线观看| 精品久久久久久久久久久久包黑料| 国产成人av影院| 一区二区三区日韩| 精品国产乱码91久久久久久网站| 国产精品综合一区二区三区| 亚洲美女电影在线| 欧美tickling挠脚心丨vk| 91丝袜美女网| 久久99国产精品麻豆| 国产精品久久久久久久久久免费看| 欧美性色aⅴ视频一区日韩精品| 久久电影网站中文字幕 | 国产一区二区成人久久免费影院| 国产精品乱人伦一区二区| 欧美色图天堂网| 成人网页在线观看| 欧美aaaaa成人免费观看视频| 国产精品天天摸av网| 欧美一三区三区四区免费在线看| 99久久精品一区| 韩国精品一区二区| 亚洲一二三四区| 亚洲欧洲无码一区二区三区| 91精品国产91久久久久久一区二区 | 91极品视觉盛宴| 国产在线乱码一区二区三区| 亚洲高清免费一级二级三级| 日韩一区欧美一区| 久久免费视频色| 欧美另类videos死尸| av在线综合网| 国产成人精品网址| 免费成人在线网站| 亚洲第一主播视频| 一区二区三区在线观看网站| 国产精品电影院| 久久精品亚洲麻豆av一区二区 | 天堂蜜桃91精品| 中文字幕一区二区三区在线不卡| 日韩欧美国产综合在线一区二区三区| 在线视频一区二区三| av不卡一区二区三区| 国产98色在线|日韩| 久久69国产一区二区蜜臀| 日韩不卡免费视频| 午夜激情久久久| 日韩精品三区四区| 亚洲最新视频在线观看| 亚洲欧洲av另类| 亚洲欧洲日产国码二区| 欧美经典三级视频一区二区三区| 欧美xxx久久| 精品国产一二三| 欧美精品一区二区蜜臀亚洲| 欧美mv和日韩mv国产网站| 欧美变态口味重另类| 日韩免费视频线观看| 亚洲精品一区二区三区香蕉| 日韩精品一区二| 久久久久88色偷偷免费| 久久久久久久免费视频了| 久久综合色鬼综合色| 久久女同互慰一区二区三区| 国产色综合一区| 成人欧美一区二区三区黑人麻豆| 国产精品国产三级国产| 亚洲精品第1页| 视频一区中文字幕| 国内精品嫩模私拍在线| 国产精品1区2区| 色综合久久综合网97色综合| 欧美亚洲图片小说| 欧美一区二区视频在线观看2022| 欧美一级片在线看| 国产欧美日韩激情| 亚洲婷婷综合久久一本伊一区| 一区二区三区欧美亚洲| 美女国产一区二区三区| 国产精品原创巨作av| 91一区一区三区| 制服视频三区第一页精品| 久久综合狠狠综合久久综合88| 国产精品五月天| 专区另类欧美日韩| 水蜜桃久久夜色精品一区的特点| 久久精品国产网站| 99精品视频在线观看| 欧美日本不卡视频| 国产亚洲一区二区三区在线观看| 亚洲欧洲美洲综合色网| 日韩中文字幕91| 国产91精品精华液一区二区三区 | 亚洲国产精品天堂| 老司机精品视频在线| 97久久超碰精品国产| 欧美美女视频在线观看| 中文字幕+乱码+中文字幕一区| 亚洲综合免费观看高清完整版| 美女视频黄 久久| 91在线观看污| 日韩欧美国产高清| 国产精品乱码一区二区三区软件 | 精品视频色一区| 国产欧美日韩亚州综合| 久久99精品国产.久久久久久| 粉嫩av亚洲一区二区图片| 精品视频一区二区不卡| 中文字幕国产精品一区二区| 日日夜夜一区二区| www.欧美日韩国产在线| 精品国产一区二区三区av性色| 一区二区三区不卡视频在线观看| 国产在线观看免费一区| 欧美日韩和欧美的一区二区| 日本一区二区三区免费乱视频| 奇米亚洲午夜久久精品| 色婷婷亚洲婷婷| 中文av一区二区| 久久精品国产澳门| 欧美日韩一区二区在线观看视频| 国产精品每日更新| 国产精品91一区二区| 91精品国产91久久久久久最新毛片| 亚洲男人的天堂在线aⅴ视频| 极品少妇xxxx精品少妇| 6080亚洲精品一区二区| 亚洲影视资源网| 成人国产精品免费观看| 久久免费看少妇高潮| 国内精品国产三级国产a久久| 欧美日韩国产欧美日美国产精品| 1024成人网| 99热99精品| 中文字幕一区二区三区色视频 | 精品国产成人系列| 日韩不卡免费视频| 欧美一区二区三区免费大片| 亚洲国产aⅴ成人精品无吗| 日本伦理一区二区| 亚洲精品美国一| 欧美在线免费视屏| 一区二区三区四区视频精品免费 | 亚洲精品国产精品乱码不99 | 久久久精品一品道一区| 久久99久久精品欧美| 欧美成人在线直播| 国产在线视频一区二区| 久久影音资源网| 精品一区二区国语对白| 久久综合久久综合九色| 国产精品资源站在线| 久久久不卡网国产精品二区| 国产乱码精品1区2区3区| 国产网红主播福利一区二区| 风流少妇一区二区| 国产精品久久三区| 色综合久久精品| 亚洲国产日韩一区二区| 欧美精品日韩精品| 久久66热re国产| 中文字幕不卡在线观看| 色婷婷亚洲综合| 视频一区二区三区入口| 欧美xingq一区二区| 国产二区国产一区在线观看| 欧美经典一区二区三区| 色一情一伦一子一伦一区| 日韩高清不卡一区| 久久久亚洲精品石原莉奈 | 大桥未久av一区二区三区中文| 国产日韩欧美不卡在线| 一本久久a久久免费精品不卡| 亚洲1区2区3区视频| 久久综合九色综合97婷婷女人| heyzo一本久久综合| 午夜精品一区在线观看| 久久这里只精品最新地址| 91丨porny丨户外露出| 日本人妖一区二区| 国产精品午夜电影|