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

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

?? os_core.c

?? 非常經典的8051F040代碼
?? 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) reentrant
{
    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) reentrant
{
    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) reentrant
{
    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) reentrant
{
    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) reentrant
{
    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) reentrant
{
    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一区二区三区免费野_久草精品视频
日韩欧美一区中文| 日韩一级片在线观看| 成人美女视频在线观看18| 久久91精品久久久久久秒播| 日韩成人一级片| 日韩国产在线一| 麻豆久久久久久久| 久久精品国产一区二区三 | 69p69国产精品| 91麻豆精品国产91久久久更新时间 | 欧美一区二区黄| 欧美电视剧在线看免费| 精品久久人人做人人爱| 国产网站一区二区| 亚洲天堂2016| 日韩和的一区二区| 国产成人在线观看免费网站| 99精品桃花视频在线观看| 欧美午夜片在线看| 欧美xxxxxxxx| 国产精品久线在线观看| 亚洲va欧美va天堂v国产综合| 美女网站一区二区| 波多野结衣亚洲一区| 欧美亚洲免费在线一区| 日韩视频一区二区| 中文字幕在线观看一区| 五月综合激情日本mⅴ| 国产91丝袜在线18| 欧美日韩亚洲综合| 国产日韩欧美麻豆| 日韩在线观看一区二区| 不卡的电影网站| 69久久99精品久久久久婷婷| 国产精品网站在线播放| 视频一区二区三区在线| 99免费精品在线观看| 51精品国自产在线| 日韩一区欧美一区| 美美哒免费高清在线观看视频一区二区 | 99久久久精品免费观看国产蜜| 欧美久久久久中文字幕| 亚洲三级在线播放| 黄色资源网久久资源365| 精品污污网站免费看| 国产精品久久久久久福利一牛影视 | 欧美大胆一级视频| 亚洲男女一区二区三区| 国产另类ts人妖一区二区| 在线精品观看国产| 国产精品久久久久久久第一福利 | a4yy欧美一区二区三区| 日韩一级黄色片| 亚洲一区二区三区小说| 成人av网址在线| 久久久久国产一区二区三区四区| 日日摸夜夜添夜夜添亚洲女人| 91国内精品野花午夜精品| 中文子幕无线码一区tr| 国产麻豆精品在线观看| 日韩亚洲欧美在线| 亚洲不卡av一区二区三区| 91国产免费观看| 亚洲精品成人悠悠色影视| 成人a区在线观看| 久久久亚洲综合| 久久se精品一区二区| 日韩一区二区电影在线| 日韩精品视频网| 日韩精品一区二区三区中文不卡 | 99国产精品一区| 国产精品乱码久久久久久| 国产不卡一区视频| 国产亚洲欧美一区在线观看| 粉嫩aⅴ一区二区三区四区| 久久久精品2019中文字幕之3| 国精产品一区一区三区mba桃花| 精品国产一区二区三区av性色| 免费成人在线视频观看| 日韩精品一区在线| 国产在线精品一区二区夜色| 久久综合久久综合久久综合| 国产精品一区二区无线| 国产网站一区二区三区| 99天天综合性| 亚洲综合久久久久| 欧美一级精品大片| 国产精品一区不卡| 亚洲乱码精品一二三四区日韩在线 | 91日韩一区二区三区| 亚洲一区二区在线视频| 欧美一二三在线| 国产成人免费网站| 一区二区三区四区高清精品免费观看 | 丝袜美腿高跟呻吟高潮一区| 3atv在线一区二区三区| 国产一区视频网站| 亚洲丝袜自拍清纯另类| 91精品国产综合久久久久久漫画| 久久精品噜噜噜成人av农村| 亚洲国产精品t66y| 欧洲一区在线电影| 国内精品久久久久影院薰衣草 | 欧美午夜免费电影| 久久99精品国产| 国产精品乱人伦中文| 欧美亚洲综合在线| 国产精品一区二区三区乱码| 国产精品福利在线播放| 欧美精品一二三| 成人免费va视频| 免费在线观看一区| 亚洲欧洲综合另类| 久久你懂得1024| 欧美性色欧美a在线播放| 黄色资源网久久资源365| 亚洲精品日韩综合观看成人91| 日韩欧美在线综合网| 93久久精品日日躁夜夜躁欧美| 日韩精品乱码免费| 亚洲免费观看在线观看| 精品国产一区二区三区av性色| 欧美艳星brazzers| 99在线热播精品免费| 国产九色精品成人porny| 亚洲成人一区二区| **性色生活片久久毛片| wwwwww.欧美系列| 欧美久久婷婷综合色| 91久久线看在观草草青青| 国产成人精品网址| 久久国内精品自在自线400部| 亚洲综合丁香婷婷六月香| 国产精品久久久久婷婷 | 91麻豆自制传媒国产之光| 精品在线免费视频| 视频一区二区中文字幕| 亚洲福利电影网| 亚洲综合无码一区二区| 亚洲天堂久久久久久久| 国产精品午夜久久| 中文子幕无线码一区tr| 日本一区二区免费在线观看视频 | 美国av一区二区| 视频一区中文字幕国产| 偷拍一区二区三区四区| 亚洲成人资源网| 亚洲中国最大av网站| 亚洲精品美腿丝袜| 亚洲男人电影天堂| 亚洲一区二区三区视频在线| 亚洲综合色在线| 亚洲大片精品永久免费| 偷拍与自拍一区| 日本中文字幕不卡| 久久成人综合网| 国产精品一区二区在线播放| 国产成人精品影视| 99综合电影在线视频| 色美美综合视频| 欧美日韩黄视频| 欧美一级一级性生活免费录像| 日韩精品一区二区三区中文不卡| 精品国产区一区| 欧美国产激情二区三区| 亚洲欧洲美洲综合色网| 一二三区精品视频| 午夜精品在线视频一区| 另类专区欧美蜜桃臀第一页| 国产精品一区二区免费不卡| 972aa.com艺术欧美| 欧美日本不卡视频| 精品国产一区二区三区忘忧草| 国产喷白浆一区二区三区| 中文字幕字幕中文在线中不卡视频| 一区二区欧美精品| 麻豆91在线播放免费| 福利一区二区在线| 在线欧美一区二区| 精品乱人伦小说| 亚洲人成网站精品片在线观看| 视频一区视频二区在线观看| 国产成人精品网址| 欧美日本在线一区| 国产人伦精品一区二区| 午夜电影久久久| 成人黄色小视频| 在线播放欧美女士性生活| 久久精品视频一区| 日韩有码一区二区三区| 成人av在线播放网址| 国产亚洲欧洲一区高清在线观看| 国产精品区一区二区三区 | 欧美肥胖老妇做爰| 国产日韩欧美精品综合| 天天色天天操综合| 91在线无精精品入口| 久久亚洲精华国产精华液| 亚洲一二三区在线观看| 国产成人99久久亚洲综合精品|