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

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

?? os_core.c

?? UcOS2.76在ATMEL AT91RM9200 ARM9上的移植代碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):

void  OSIntEnter (void)
{
    if (OSRunning == 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)
{
    INT8U      y;
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    OS_CPU_SR  cpu_sr;
    
    

    cpu_sr = 0;                                            /* Prevent compiler warning                 */
#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.                      */
                y             = OSUnMapTbl[OSRdyGrp];          
                OSPrioHighRdy = (INT8U)((y << 3) + OSUnMapTbl[OSRdyTbl[y]]);
                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;
    
    

    cpu_sr = 0;                                  /* Prevent compiler warning                           */
#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;
    
    

    cpu_sr = 0;                                            /* Prevent compiler warning                 */
#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)
{
    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 - ------------)
*                                            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;
    
    

    cpu_sr = 0;                                  /* Prevent compiler warning                           */
#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;



    cpu_sr = 0;                                            /* Prevent compiler warning                     */
#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;
                    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产制服丝袜一区| 欧美肥妇bbw| 国产成人在线免费观看| 热久久国产精品| 日韩中文欧美在线| 日韩高清中文字幕一区| 国产成人精品亚洲日本在线桃色| 青草国产精品久久久久久| 日韩成人免费在线| 美女国产一区二区| 免费成人性网站| 蓝色福利精品导航| 国产一区二区在线看| 国产精品18久久久久| 福利一区福利二区| 99久久免费国产| 色狠狠色狠狠综合| 欧美日韩亚洲综合在线| 欧美肥大bbwbbw高潮| 欧美岛国在线观看| 国产亚洲欧美色| 欧美—级在线免费片| 中文字幕视频一区二区三区久| 亚洲图片欧美激情| 夜夜操天天操亚洲| 日韩电影免费在线| 激情文学综合插| www.色综合.com| 在线观看av不卡| 欧美成人午夜电影| 国产精品久久久久aaaa樱花| 亚洲第一搞黄网站| 精品亚洲porn| 91色在线porny| 6080国产精品一区二区| 国产欧美精品区一区二区三区| ...中文天堂在线一区| 丝袜美腿一区二区三区| 国产一区二区视频在线| 色偷偷久久人人79超碰人人澡| 91麻豆精品国产91久久久资源速度 | 久久99久久久久久久久久久| 国产成人在线观看| 欧美中文字幕一区二区三区亚洲| 日韩免费观看高清完整版| 中文在线一区二区| 亚洲bt欧美bt精品| 风流少妇一区二区| 欧美日韩国产一区| 亚洲国产高清不卡| 日韩电影免费一区| 不卡欧美aaaaa| 日韩精品最新网址| 亚洲伦在线观看| 久久99久久99小草精品免视看| 91麻豆国产自产在线观看| 精品日韩在线观看| 亚洲综合激情网| 国产91精品精华液一区二区三区 | 欧美成人一区二区三区片免费 | 国产精品女主播在线观看| 亚洲chinese男男1069| 粉嫩av一区二区三区粉嫩| 欧美美女一区二区在线观看| 国产精品视频免费| 精品一区二区国语对白| 欧美日韩成人激情| 自拍偷拍国产亚洲| 国产成人超碰人人澡人人澡| 欧美一区日本一区韩国一区| 亚洲欧洲一区二区在线播放| 狠狠色丁香婷婷综合| 欧美精品丝袜中出| 亚洲蜜臀av乱码久久精品| 国产一区二区三区四区五区美女| 欧洲精品一区二区| 国产精品成人网| 国内精品伊人久久久久影院对白| 欧美日韩亚洲综合一区二区三区| 一色桃子久久精品亚洲| 国产美女久久久久| 日韩欧美一区二区在线视频| 亚洲一区在线电影| 色婷婷综合久久久中文字幕| 欧美激情一二三区| 国产成人精品在线看| 精品国偷自产国产一区| 日韩黄色免费电影| 欧美三级在线看| 悠悠色在线精品| 97久久久精品综合88久久| 欧美韩国日本综合| 国产成人无遮挡在线视频| 精品国产乱码久久久久久久 | 欧美日韩精品一区二区三区四区| 国产精品国产三级国产aⅴ原创| 国产乱码精品1区2区3区| 久久亚洲一区二区三区四区| 精品在线一区二区三区| 欧美电影免费提供在线观看| 开心九九激情九九欧美日韩精美视频电影 | 亚洲欧美激情小说另类| 色综合久久久久综合| 亚洲丝袜自拍清纯另类| 色综合夜色一区| 亚洲伦在线观看| 欧美午夜一区二区三区| 亚洲国产精品久久久男人的天堂| 91成人免费电影| 午夜精品视频一区| 777xxx欧美| 狠狠久久亚洲欧美| 欧美韩日一区二区三区四区| av电影天堂一区二区在线观看| 一区二区中文字幕在线| 在线影院国内精品| 亚洲不卡在线观看| 欧美精品日韩综合在线| 免费av网站大全久久| 精品国产免费人成电影在线观看四季| 蜜桃av一区二区三区电影| 欧美成人激情免费网| 国产成人一区在线| 一区二区在线观看视频| 欧美日韩国产欧美日美国产精品| 日韩电影在线免费看| 久久伊人蜜桃av一区二区| 不卡一区二区中文字幕| 亚洲在线免费播放| 欧美一区二区三区四区视频| 激情图区综合网| 中文字幕中文字幕在线一区 | 久久久久久免费网| 成人av在线资源网| 一区二区三区鲁丝不卡| 欧美一区二区三区性视频| 韩国成人在线视频| ㊣最新国产の精品bt伙计久久| 欧美日韩在线不卡| 91福利国产精品| 毛片不卡一区二区| 国产精品毛片a∨一区二区三区| 欧美无乱码久久久免费午夜一区 | 丁香网亚洲国际| 亚洲一区在线观看视频| 精品国产髙清在线看国产毛片| 成人激情小说乱人伦| 婷婷中文字幕综合| 欧美国产一区二区在线观看| 在线一区二区观看| 国产一区二区三区四区在线观看| 亚洲乱码国产乱码精品精可以看| 制服丝袜一区二区三区| 97se亚洲国产综合在线| 青青草国产成人av片免费 | 国产老妇另类xxxxx| 亚洲精品一二三四区| 亚洲精品一区二区三区香蕉| 91蝌蚪porny九色| 国内精品第一页| 亚洲线精品一区二区三区| 国产日韩综合av| 91精品国产综合久久久久久久| 成人一区二区三区视频在线观看 | 成人的网站免费观看| 日韩中文字幕麻豆| 亚洲三级视频在线观看| 精品国产露脸精彩对白| 欧美三片在线视频观看| 99久久久免费精品国产一区二区| 男人的j进女人的j一区| 一区二区三区四区在线免费观看| 2020国产精品| 538在线一区二区精品国产| 成人免费观看av| 久久66热re国产| 午夜精品久久一牛影视| 亚洲欧美成人一区二区三区| 国产午夜精品久久久久久免费视| 欧美高清一级片在线| 色综合久久综合网欧美综合网| 国产高清无密码一区二区三区| 热久久久久久久| 婷婷综合另类小说色区| 夜夜精品视频一区二区| 国产精品伦一区| 国产亚洲精品aa| 精品国产sm最大网站| 日韩网站在线看片你懂的| 在线播放国产精品二区一二区四区| aa级大片欧美| aaa亚洲精品| 懂色中文一区二区在线播放| 国产精品亚洲人在线观看| 精品一区二区精品| 狠狠色丁香婷综合久久| 精品中文字幕一区二区小辣椒| 蜜臀91精品一区二区三区| 97久久久精品综合88久久| 成人av在线一区二区三区|