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

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

?? os_core.c

?? Micrium-uCOS-II 2.86版
?? C
?? 第 1 頁 / 共 5 頁
字號:
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) This function should be called ith interrupts already disabled
*              2) Your ISR can directly increment OSIntNesting without calling this function because
*                 OSIntNesting has been declared 'global'.
*              3) You MUST still call OSIntExit() even though you increment OSIntNesting directly.
*              4) 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.
*              5) You are allowed to nest interrupts up to 255 levels deep.
*              6) I removed the OS_ENTER_CRITICAL() and OS_EXIT_CRITICAL() around the increment because
*                 OSIntEnter() is always called with interrupts disabled.
*********************************************************************************************************
*/

void  OSIntEnter (void)
{
    if (OSRunning == OS_TRUE) {
        if (OSIntNesting < 255u) {
            OSIntNesting++;                      /* Increment ISR nesting level                        */
        }
    }
}
/*$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 OS_SchedLock())
*********************************************************************************************************
*/

void  OSIntExit (void)
{
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    OS_CPU_SR  cpu_sr = 0;
#endif



    if (OSRunning == OS_TRUE) {
        OS_ENTER_CRITICAL();
        if (OSIntNesting > 0) {                            /* Prevent OSIntNesting from wrapping       */
            OSIntNesting--;
        }
        if (OSIntNesting == 0) {                           /* Reschedule only if all ISRs complete ... */
            if (OSLockNesting == 0) {                      /* ... and not locked.                      */
                OS_SchedNew();
                if (OSPrioHighRdy != OSPrioCur) {          /* No Ctx Sw if current task is highest rdy */
                    OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy];
#if OS_TASK_PROFILE_EN > 0
                    OSTCBHighRdy->OSTCBCtxSwCtr++;         /* Inc. # of context switches to this task  */
#endif
                    OSCtxSwCtr++;                          /* Keep track of the number of ctx switches */
                    OSIntCtxSw();                          /* Perform interrupt level ctx 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().
*********************************************************************************************************
*/

#if OS_SCHED_LOCK_EN > 0
void  OSSchedLock (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0;
#endif



    if (OSRunning == OS_TRUE) {                  /* Make sure multitasking is running                  */
        OS_ENTER_CRITICAL();
        if (OSIntNesting == 0) {                 /* Can't call from an ISR                             */
            if (OSLockNesting < 255u) {          /* Prevent OSLockNesting from wrapping back to 0      */
                OSLockNesting++;                 /* Increment lock nesting level                       */
            }
        }
        OS_EXIT_CRITICAL();
    }
}
#endif

/*$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().
*********************************************************************************************************
*/

#if OS_SCHED_LOCK_EN > 0
void  OSSchedUnlock (void)
{
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    OS_CPU_SR  cpu_sr = 0;
#endif



    if (OSRunning == OS_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 == 0) {                      /* See if scheduler is enabled and ...      */
                if (OSIntNesting == 0) {                   /* ... not in an ISR                        */
                    OS_EXIT_CRITICAL();
                    OS_Sched();                            /* See if a HPT is ready                    */
                } else {
                    OS_EXIT_CRITICAL();
                }
            } else {
                OS_EXIT_CRITICAL();
            }
        } else {
            OS_EXIT_CRITICAL();
        }
    }
}
#endif

/*$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 OS_TRUE.
*                 c) Load the context of the task pointed to by OSTCBHighRdy.
*                 d_ Execute the task.
*********************************************************************************************************
*/

void  OSStart (void)
{
    if (OSRunning == OS_FALSE) {
        OS_SchedNew();                               /* Find highest priority's task priority number   */
        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 - ------------)
*                                            OSIdleCtrMax
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

#if OS_TASK_STAT_EN > 0
void  OSStatInit (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0;
#endif



    OSTimeDly(2);                                /* Synchronize with clock tick                        */
    OS_ENTER_CRITICAL();
    OSIdleCtr    = 0L;                           /* Clear idle counter                                 */
    OS_EXIT_CRITICAL();
    OSTimeDly(OS_TICKS_PER_SEC / 10);            /* Determine MAX. idle counter value for 1/10 second  */
    OS_ENTER_CRITICAL();
    OSIdleCtrMax = OSIdleCtr;                    /* Store maximum idle counter count in 1/10 second    */
    OSStatRdy    = OS_TRUE;
    OS_EXIT_CRITICAL();
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                         PROCESS SYSTEM TICK
*
* Description: This function is used to signal to uC/OS-II the occurrence of a 'system tick' (also known
*              as a 'clock tick').  This function should be called by the ticker ISR but, can also be
*              called by a high priority task.
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

void  OSTimeTick (void)
{
    OS_TCB    *ptcb;
#if OS_TICK_STEP_EN > 0
    BOOLEAN    step;
#endif
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register     */
    OS_CPU_SR  cpu_sr = 0;
#endif



#if OS_TIME_TICK_HOOK_EN > 0
    OSTimeTickHook();                                      /* Call user definable hook                     */
#endif
#if OS_TIME_GET_SET_EN > 0
    OS_ENTER_CRITICAL();                                   /* Update the 32-bit tick counter               */
    OSTime++;
    OS_EXIT_CRITICAL();
#endif
    if (OSRunning == OS_TRUE) {
#if OS_TICK_STEP_EN > 0
        switch (OSTickStepState) {                         /* Determine whether we need to process a tick  */
            case OS_TICK_STEP_DIS:                         /* Yes, stepping is disabled                    */
                 step = OS_TRUE;
                 break;

            case OS_TICK_STEP_WAIT:                        /* No,  waiting for uC/OS-View to set ...       */
                 step = OS_FALSE;                          /*      .. OSTickStepState to OS_TICK_STEP_ONCE */
                 break;

            case OS_TICK_STEP_ONCE:                        /* Yes, process tick once and wait for next ... */
                 step            = OS_TRUE;                /*      ... step command from uC/OS-View        */
                 OSTickStepState = OS_TICK_STEP_WAIT;
                 break;

            default:                                       /* Invalid case, correct situation              */
                 step            = OS_TRUE;
                 OSTickStepState = OS_TICK_STEP_DIS;
                 break;
        }
        if (step == OS_FALSE) {                            /* Return if waiting for step command           */
            return;
        }
#endif
        ptcb = OSTCBList;                                  /* Point at first TCB in TCB list               */
        while (ptcb->OSTCBPrio != OS_TASK_IDLE_PRIO) {     /* Go through all TCBs in TCB list              */
            OS_ENTER_CRITICAL();
            if (ptcb->OSTCBDly != 0) {                     /* No, Delayed or waiting for event with TO     */
                if (--ptcb->OSTCBDly == 0) {               /* Decrement nbr of ticks to end of delay       */
                                                           /* Check for timeout                            */
                    if ((ptcb->OSTCBStat & OS_STAT_PEND_ANY) != OS_STAT_RDY) {
                        ptcb->OSTCBStat  &= ~(INT8U)OS_STAT_PEND_ANY;          /* Yes, Clear status flag   */
                        ptcb->OSTCBStatPend = OS_STAT_PEND_TO;                 /* Indicate PEND timeout    */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产精品专区| 综合久久久久久久| 欧美伊人久久大香线蕉综合69 | 国产盗摄精品一区二区三区在线| 综合网在线视频| 欧美v日韩v国产v| 欧美日韩国产系列| 成人黄色片在线观看| 人人狠狠综合久久亚洲| 亚洲综合丁香婷婷六月香| 久久久精品国产免大香伊| 在线播放欧美女士性生活| 色噜噜狠狠色综合中国| 国产iv一区二区三区| 免费高清在线一区| 亚洲一区二区三区在线播放| 欧美国产日本韩| 久久久另类综合| 日韩精品一区二区三区中文不卡| 欧美自拍偷拍一区| 色悠悠久久综合| 懂色av中文一区二区三区| 久久99久久99| 老司机精品视频在线| 日韩精品三区四区| 亚洲制服丝袜一区| 有坂深雪av一区二区精品| 中文字幕一区二区三区在线不卡| 26uuu亚洲综合色欧美| 777色狠狠一区二区三区| 欧美色老头old∨ideo| 欧美调教femdomvk| 在线视频国内自拍亚洲视频| 色视频成人在线观看免| 色综合久久久久综合| 色综合久久久网| 色哟哟欧美精品| 欧美在线视频不卡| 亚洲美女免费视频| 亚洲天堂久久久久久久| 国产精品国产三级国产aⅴ无密码| 欧美韩日一区二区三区四区| 国产亚洲一区字幕| 国产日韩影视精品| 国产精品电影院| 亚洲欧美激情一区二区| 亚洲综合清纯丝袜自拍| 一级日本不卡的影视| 亚洲国产视频在线| 日韩av一区二区三区四区| 日韩在线卡一卡二| 免费高清不卡av| 精品在线观看视频| 处破女av一区二区| 色婷婷久久99综合精品jk白丝| 91亚洲精品久久久蜜桃网站| 色妹子一区二区| 欧美日韩国产片| 欧美精品色综合| 欧美mv日韩mv| 国产精品第一页第二页第三页| 国产精品久久久久永久免费观看| 中文字幕一区在线| 亚洲尤物视频在线| 精品午夜久久福利影院| 国产盗摄女厕一区二区三区| 91视频www| 日韩一级完整毛片| 国产情人综合久久777777| 国产精品国产成人国产三级 | 日韩美女啊v在线免费观看| 亚洲精品免费一二三区| 午夜精品久久久久久久| 韩国欧美国产一区| 日本二三区不卡| 欧美一级免费观看| 自拍偷自拍亚洲精品播放| 五月天欧美精品| 国产精品911| 在线观看日韩高清av| 日韩一二在线观看| 综合精品久久久| 免费观看91视频大全| 成人黄色综合网站| 亚洲男女毛片无遮挡| 午夜精品福利视频网站| 老司机免费视频一区二区| 91性感美女视频| 9久草视频在线视频精品| 欧美性videosxxxxx| 日韩一区二区三区视频在线| 亚洲成人中文在线| 精品一区二区三区在线观看| 精品亚洲成a人在线观看 | 91一区在线观看| 欧美在线免费播放| 国产亚洲综合在线| 日本中文字幕一区二区视频| 成人aaaa免费全部观看| 欧美一级久久久| 一区二区日韩av| 成人小视频在线| 欧美变态tickle挠乳网站| 亚洲免费观看高清完整版在线观看| 蜜桃久久久久久| 欧美图片一区二区三区| 日韩一区在线播放| 国产精品一区二区视频| 欧美日韩小视频| 亚洲人精品午夜| 波多野结衣中文字幕一区| 欧美成人精精品一区二区频| 一区二区久久久久| 亚洲精品在线免费观看视频| 亚洲免费三区一区二区| 国产成人免费在线观看不卡| 91精品在线免费| 一区二区三区蜜桃| 91麻豆成人久久精品二区三区| 国产亲近乱来精品视频| 六月丁香婷婷久久| 日韩欧美亚洲国产精品字幕久久久 | 久久激情五月婷婷| 欧美日韩国产综合视频在线观看| 亚洲欧美偷拍卡通变态| 成人激情动漫在线观看| 国产视频911| 国产精品一区二区不卡| 精品国产一二三| 日韩成人一级片| 欧美精品成人一区二区三区四区| 一二三区精品视频| 欧美性大战xxxxx久久久| 亚洲午夜私人影院| 色天使久久综合网天天| 亚洲精品视频一区二区| 色婷婷精品大视频在线蜜桃视频| 国产精品久99| 色先锋久久av资源部| 一区二区久久久久久| 欧美视频在线一区| 视频在线观看国产精品| 日韩视频免费观看高清完整版在线观看 | 国产毛片精品视频| 久久丝袜美腿综合| 欧美亚男人的天堂| proumb性欧美在线观看| 奇米影视一区二区三区小说| 国产欧美1区2区3区| 欧美日韩精品欧美日韩精品 | 欧美调教femdomvk| 国产精品视频一二| 精品国精品自拍自在线| 亚洲综合一区二区精品导航| 91免费观看视频在线| 专区另类欧美日韩| 99精品欧美一区二区蜜桃免费 | 日韩一级二级三级| 精品在线亚洲视频| 久久精品这里都是精品| 国产成人精品免费| 国产精品国产三级国产aⅴ原创| av福利精品导航| 亚洲一区二区av电影| 欧美精品自拍偷拍动漫精品| 久久成人综合网| 中文在线一区二区 | 国产亚洲欧美日韩在线一区| 99这里都是精品| 亚洲国产成人91porn| 欧美一卡在线观看| 丰满亚洲少妇av| 亚洲一区二区三区中文字幕在线| 欧美一区二区三区人| 国产**成人网毛片九色| 亚洲国产美国国产综合一区二区| 日韩欧美卡一卡二| www.欧美.com| 日本不卡视频在线观看| 国产精品欧美极品| 欧美喷水一区二区| 成人久久18免费网站麻豆 | 国产乱码字幕精品高清av | 制服丝袜国产精品| 成人涩涩免费视频| 性做久久久久久久免费看| 久久免费视频一区| 欧美精品三级在线观看| 亚洲蜜臀av乱码久久精品| 一区二区在线看| 色综合色综合色综合色综合色综合| 欧美私人免费视频| 日韩欧美国产一区二区三区| 精品捆绑美女sm三区| 中文字幕欧美日本乱码一线二线| 国产精品久99| 麻豆精品久久精品色综合| 欧美色爱综合网| 欧美一区二区日韩一区二区| 日本一区免费视频|