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

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

?? os_core.c

?? ucos2.86版本結合STM板極支持包
?? C
?? 第 1 頁 / 共 5 頁
字號:
*********************************************************************************************************
*/

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    */
                    } else {
                        ptcb->OSTCBStatPend = OS_STAT_PEND_OK;
                    }

                    if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) {  /* Is task suspended?       */
                        OSRdyGrp               |= ptcb->OSTCBBitY;             /* No,  Make ready          */
                        OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
                    }
                }
            }
            ptcb = ptcb->OSTCBNext;                        /* Point at next TCB in TCB list                */
            OS_EXIT_CRITICAL();
        }
    }
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                             GET VERSION
*
* Description: This function is used to return the version number of uC/OS-II.  The returned value

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色噜噜| 欧美aaaaa成人免费观看视频| 99这里都是精品| 91浏览器入口在线观看| 国产 日韩 欧美大片| 国产福利精品导航| 国产91精品一区二区麻豆网站| 美女视频黄频大全不卡视频在线播放| 一区二区三区不卡视频在线观看 | 在线免费观看一区| 91麻豆免费视频| 成人午夜av在线| 成人免费黄色在线| 色婷婷综合久久久中文字幕| 717成人午夜免费福利电影| 欧美精品一区男女天堂| 亚洲天堂精品视频| 日本不卡123| 国产精品影视网| 欧美性大战久久久久久久| 91精品一区二区三区在线观看| 日韩一级免费观看| 亚洲黄一区二区三区| 亚洲自拍偷拍综合| www.色综合.com| 精品国产乱子伦一区| 亚洲国产精品天堂| 99久久夜色精品国产网站| 欧美日韩一区二区不卡| 亚洲欧美日本在线| 99精品欧美一区二区蜜桃免费| 欧美一区二区高清| 亚洲精品菠萝久久久久久久| www.色综合.com| 日韩毛片视频在线看| 91网上在线视频| 国产精品护士白丝一区av| 国产精品一区二区三区四区| 久久久天堂av| 日产国产高清一区二区三区| 精品粉嫩超白一线天av| 国产专区欧美精品| 欧美激情在线一区二区三区| 成人亚洲精品久久久久软件| 中文字幕电影一区| 91片黄在线观看| 婷婷久久综合九色综合伊人色| 欧美妇女性影城| 国产乱码字幕精品高清av| 一区二区中文字幕在线| 福利91精品一区二区三区| 亚洲美女偷拍久久| 日韩一区二区三区免费观看| 加勒比av一区二区| 亚洲视频 欧洲视频| 欧美色网站导航| 国产69精品久久777的优势| 亚洲视频电影在线| 26uuu国产日韩综合| 91浏览器入口在线观看| 久久精品久久99精品久久| 最新热久久免费视频| 日韩亚洲欧美在线观看| 成人久久视频在线观看| 三级精品在线观看| 一区二区三区蜜桃网| 日韩一区二区影院| 色婷婷久久久综合中文字幕| 激情深爱一区二区| 久久草av在线| 久久福利视频一区二区| 国产美女一区二区| 国内精品写真在线观看| 蜜臀久久久99精品久久久久久| 亚洲成人av一区二区三区| 自拍av一区二区三区| 亚洲欧美影音先锋| 一区二区国产盗摄色噜噜| 亚洲精品一卡二卡| 亚洲欧美经典视频| 精品国产制服丝袜高跟| 久久综合网色—综合色88| 久久日韩精品一区二区五区| 亚洲精品一区二区三区福利| 国产日韩欧美制服另类| 一区二区免费在线播放| 一区二区三区国产豹纹内裤在线| 亚洲自拍偷拍网站| 国产精品12区| 在线观看国产一区二区| 久久午夜老司机| 亚洲另类在线一区| 日韩激情av在线| 91女厕偷拍女厕偷拍高清| 6080yy午夜一二三区久久| 久久精品欧美日韩| 九九**精品视频免费播放| 一本到高清视频免费精品| 久久久www成人免费无遮挡大片| 美女网站一区二区| 欧美一区二区三区小说| 亚洲国产综合91精品麻豆| 日本伦理一区二区| 亚洲国产另类av| 91精品国产一区二区三区香蕉| 亚洲mv大片欧洲mv大片精品| 欧美一区二区三区人| 日本美女视频一区二区| 欧美精品一区二区在线播放 | 91精品蜜臀在线一区尤物| 亚洲午夜精品在线| 欧美电视剧免费全集观看| 国产精品 欧美精品| 亚洲免费色视频| 欧美一区二区三区影视| 成人app网站| 日韩制服丝袜av| 国产亚洲欧洲997久久综合| 久久精品国产99国产精品| 久久久久高清精品| 91久久香蕉国产日韩欧美9色| 强制捆绑调教一区二区| 久久老女人爱爱| 欧洲av一区二区嗯嗯嗯啊| 亚洲成人av一区二区三区| 久久综合九色综合欧美亚洲| 99久久精品久久久久久清纯| 日韩av电影免费观看高清完整版 | 亚洲一区二区偷拍精品| 精品少妇一区二区三区在线播放 | 亚洲国产精品成人综合| 欧美日韩一区二区三区免费看| 成人一级黄色片| 久久精品国产网站| 亚洲成人动漫在线观看| 亚洲精品中文在线观看| 中文字幕一区二区在线观看| 精品国产精品网麻豆系列| 91精品国产乱码久久蜜臀| 在线精品视频一区二区三四| 91色九色蝌蚪| 一本色道久久综合亚洲aⅴ蜜桃 | 蜜桃91丨九色丨蝌蚪91桃色| 亚洲第一久久影院| 亚洲国产综合91精品麻豆| 日韩成人一级片| 婷婷久久综合九色国产成人| 奇米影视一区二区三区小说| 亚洲国产成人av网| 蜜桃在线一区二区三区| 精品在线一区二区三区| 国产成人免费视频一区| 成人午夜视频在线| 欧美性三三影院| 精品福利在线导航| 亚洲精品成人在线| 免费人成精品欧美精品| 国产久卡久卡久卡久卡视频精品| 成人av网站免费观看| 欧美中文字幕不卡| 精品黑人一区二区三区久久 | 国产黄色91视频| 日本久久一区二区| 久久久不卡影院| 亚洲成av人片www| 不卡的av在线播放| 91精品国产91久久综合桃花 | 99久久婷婷国产| 久久综合九色综合欧美就去吻| 亚洲黄色录像片| 国产精华液一区二区三区| 欧美老肥妇做.爰bbww视频| 中文字幕va一区二区三区| 秋霞电影一区二区| 制服丝袜在线91| 图片区日韩欧美亚洲| 91成人免费网站| 亚洲日本在线a| 一本久道久久综合中文字幕 | 欧美日韩亚洲综合一区二区三区| 精品久久久久久久久久久院品网| 国产精品高潮呻吟久久| 久草在线在线精品观看| 欧美成人vps| 美女视频第一区二区三区免费观看网站| 99视频精品全部免费在线| 日韩精品中文字幕在线不卡尤物| 五月天丁香久久| 欧美成人女星排行榜| 国产精品亚洲专一区二区三区 | 中文字幕中文字幕一区二区| 成人免费视频视频| 亚洲婷婷国产精品电影人久久| 欧美日韩和欧美的一区二区| 六月丁香婷婷久久| 91精品国产色综合久久不卡蜜臀| 理论片日本一区| 国产精品麻豆视频| 欧美日本一区二区三区四区| 韩国女主播成人在线|