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

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

?? os_core.c

?? ucos2.8 系統(tǒng)的源代碼 我找到的 可以使用
?? C
?? 第 1 頁 / 共 5 頁
字號:
*
* 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 == 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 == TRUE) {                     /* Make sure multitasking is running                  */
        OS_ENTER_CRITICAL();
        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 == 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 TRUE.
*                 c) Load the context of the task pointed to by OSTCBHighRdy.
*                 d_ Execute the task.
*********************************************************************************************************
*/

void  OSStart (void)
{
    if (OSRunning == 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    = 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 == 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 = TRUE;
                 break;

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

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

            default:                                       /* Invalid case, correct situation              */
                 step            = TRUE;
                 OSTickStepState = OS_TICK_STEP_DIS;
                 break;
        }
        if (step == FALSE) {                               /* Return if waiting for step command           */
            return;
        }
#endif
        ptcb = OSTCBList;                                  /* Point at first TCB in TCB list               */
        while (ptcb->OSTCBPrio != OS_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   &= ~OS_STAT_PEND_ANY;                /* Yes, Clear status flag   */
                        ptcb->OSTCBPendTO  = TRUE;                             /* Indicate PEND timeout    */
                    } else {
                        ptcb->OSTCBPendTO  = FALSE;
                    }

                    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
*              corresponds to uC/OS-II's version number multiplied by 100.  In other words, version 2.00
*              would be returned as 200.
*
* Arguments  : none
*
* Returns    : the version number of uC/OS-II multiplied by 100.
*********************************************************************************************************
*/

INT16U  OSVersion (void)
{
    return (OS_VERSION);
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                            DUMMY FUNCTION
*
* Description: This function doesn't do anything.  It is called by OSTaskDel().
*
* Arguments  : none

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
捆绑变态av一区二区三区| 韩国精品在线观看| 久久久久久亚洲综合| 91美女在线视频| 国产美女在线精品| 视频一区中文字幕国产| 中文字幕一区二区三区四区不卡 | 国产一区二区三区在线观看免费 | 欧美美女bb生活片| 成人精品免费看| 精品制服美女久久| 婷婷亚洲久悠悠色悠在线播放 | 一区二区三区在线观看网站| 久久蜜桃一区二区| 91精品欧美福利在线观看| 91热门视频在线观看| 国产超碰在线一区| 国产最新精品免费| 久久精品噜噜噜成人88aⅴ| 亚洲gay无套男同| 一二三四社区欧美黄| 最新高清无码专区| 国产精品免费免费| 久久久www成人免费毛片麻豆 | 国产成人精品亚洲777人妖 | 午夜精品久久久久久久久| 亚洲三级在线免费观看| 国产精品家庭影院| 国产日产欧美一区二区三区| xnxx国产精品| 久久综合色8888| 国产亚洲女人久久久久毛片| 久久一留热品黄| 久久这里只有精品视频网| 欧美精品一区视频| 国产亚洲一二三区| 国产精品丝袜在线| 自拍偷自拍亚洲精品播放| 综合激情成人伊人| 亚洲欧洲制服丝袜| 夜夜嗨av一区二区三区| 亚洲影视在线播放| 亚洲精品va在线观看| 亚洲国产一区视频| 五月激情六月综合| 蜜桃一区二区三区在线| 久久精品国产澳门| 国产一区999| 成人自拍视频在线| 91一区二区在线| 欧美三级中文字| 91精品国产色综合久久不卡电影 | 欧美丰满美乳xxx高潮www| 欧美美女直播网站| 精品日本一线二线三线不卡| 久久精品欧美一区二区三区不卡| 国产精品色噜噜| 一卡二卡三卡日韩欧美| 五月天中文字幕一区二区| 青青国产91久久久久久| 韩日av一区二区| 成人午夜免费电影| 欧美在线999| 欧美成人在线直播| 国产精品天天摸av网| 亚洲一区二区三区中文字幕 | 亚洲视频一区在线观看| 亚洲国产精品久久久久秋霞影院| 日产欧产美韩系列久久99| 国产麻豆精品视频| 色综合中文字幕国产 | 国产精品三级视频| 亚洲一区二区中文在线| 久久不见久久见中文字幕免费| 国产高清在线观看免费不卡| 色综合天天狠狠| 欧美大白屁股肥臀xxxxxx| 国产精品白丝在线| 免费日本视频一区| 94-欧美-setu| 欧美变态口味重另类| 亚洲日本一区二区三区| 日韩黄色在线观看| av亚洲产国偷v产偷v自拍| 8v天堂国产在线一区二区| 国产精品麻豆欧美日韩ww| 日本在线不卡一区| av不卡一区二区三区| 5566中文字幕一区二区电影| 国产精品免费视频观看| 毛片不卡一区二区| 欧美亚日韩国产aⅴ精品中极品| 精品国产成人系列| 亚洲成av人综合在线观看| 丁香婷婷深情五月亚洲| 91精品国产欧美一区二区成人| 国产精品美女久久久久高潮| 欧美a级理论片| 欧洲精品在线观看| 中文字幕第一区综合| 久久精品国产成人一区二区三区| 色欧美日韩亚洲| 国产婷婷色一区二区三区| 麻豆一区二区在线| 欧美日韩国产高清一区| 亚洲天堂av一区| 国产成人欧美日韩在线电影| 这里只有精品免费| 亚洲一区二区三区四区在线观看| 福利一区二区在线| 欧美电影免费观看完整版| 亚洲一区二区在线免费观看视频| 成人在线视频一区| 精品粉嫩aⅴ一区二区三区四区| 亚洲一区二区三区四区中文字幕| caoporen国产精品视频| 久久久久国产精品人| 久久99精品久久久| 欧美一区二区成人6969| 亚洲超丰满肉感bbw| 色婷婷精品久久二区二区蜜臂av| 国产精品日日摸夜夜摸av| 国产成人免费9x9x人网站视频| 精品国偷自产国产一区| 久久99日本精品| 日韩一区二区在线观看| 日韩精品国产精品| 666欧美在线视频| 视频一区视频二区中文| 欧美高清视频www夜色资源网| 亚洲香肠在线观看| 精品视频123区在线观看| 午夜婷婷国产麻豆精品| 欧美精品丝袜久久久中文字幕| 亚洲综合激情另类小说区| 91蝌蚪国产九色| 亚洲人123区| 欧美色图天堂网| 日日噜噜夜夜狠狠视频欧美人| 在线播放欧美女士性生活| 青青草国产精品97视觉盛宴| 91精品在线一区二区| 久久99精品一区二区三区| 久久―日本道色综合久久| 国产麻豆成人精品| 国产精品久久国产精麻豆99网站| 91亚洲国产成人精品一区二三| 最新国产の精品合集bt伙计| 91搞黄在线观看| 首页综合国产亚洲丝袜| 精品剧情v国产在线观看在线| 国产一区二区福利视频| 中文字幕一区二区三区色视频| 色噜噜狠狠色综合中国| 亚洲一区二区偷拍精品| 国产精品午夜电影| 久久国产视频网| 久久久久久久一区| 26uuu亚洲| 精品国产3级a| 欧美天天综合网| 亚洲动漫第一页| 丰满亚洲少妇av| 极品美女销魂一区二区三区免费| 精品国产乱码久久久久久图片| 另类欧美日韩国产在线| 精品国产乱码久久| 日韩精品一区二区在线| 国产成人av资源| 国产成人福利片| 国产成人一区在线| 中文字幕字幕中文在线中不卡视频| 成人18视频在线播放| 国产成人av电影免费在线观看| 中文字幕乱码日本亚洲一区二区| 9久草视频在线视频精品| 欧美xxxxxxxxx| 日韩欧美色综合网站| 国产九色sp调教91| 国产一区二区在线免费观看| 久久九九久久九九| 国产色综合久久| 精品一区二区在线免费观看| 国产丝袜欧美中文另类| 欧美日韩国产天堂| 91精品国产色综合久久不卡电影| 欧美一二三四在线| 日韩精品中午字幕| 国产免费久久精品| 亚洲天堂精品在线观看| 久久这里都是精品| 国产精品乱码一区二区三区软件| 国产精品亚洲专一区二区三区| 精品国产一区二区三区忘忧草 | 日本黄色一区二区| 亚洲日本青草视频在线怡红院| 99久久精品免费精品国产| 久久成人综合网| 色一情一伦一子一伦一区| 中文字幕一区二区三区四区不卡|