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

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

?? os_core.c

?? ucos2.8 系統的源代碼 我找到的 可以使用
?? C
?? 第 1 頁 / 共 5 頁
字號:
    for (i = 0; i < OS_RDY_TBL_SIZE; i++) {
        *prdytbl++ = 0;
    }

    OSPrioCur     = 0;
    OSPrioHighRdy = 0;

    OSTCBHighRdy  = (OS_TCB *)0;
    OSTCBCur      = (OS_TCB *)0;
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                             INITIALIZATION
*                                         CREATING THE IDLE TASK
*
* Description: This function creates the Idle Task.
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

static  void  OS_InitTaskIdle (void)
{
#if OS_TASK_NAME_SIZE > 14
    INT8U  err;
#endif


#if OS_TASK_CREATE_EXT_EN > 0
    #if OS_STK_GROWTH == 1
    (void)OSTaskCreateExt(OS_TaskIdle,
                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */
                          &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
    (void)OSTaskCreateExt(OS_TaskIdle,
                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */
                          &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  */
    #endif
#else
    #if OS_STK_GROWTH == 1
    (void)OSTaskCreate(OS_TaskIdle,
                       (void *)0,
                       &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1],
                       OS_IDLE_PRIO);
    #else
    (void)OSTaskCreate(OS_TaskIdle,
                       (void *)0,
                       &OSTaskIdleStk[0],
                       OS_IDLE_PRIO);
    #endif
#endif

#if OS_TASK_NAME_SIZE > 14
    OSTaskNameSet(OS_IDLE_PRIO, (INT8U *)"uC/OS-II Idle", &err);
#endif
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             INITIALIZATION
*                                      CREATING THE STATISTIC TASK
*
* Description: This function creates the Statistic Task.
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

#if OS_TASK_STAT_EN > 0
static  void  OS_InitTaskStat (void)
{
#if OS_TASK_NAME_SIZE > 14
    INT8U  err;
#endif


#if OS_TASK_CREATE_EXT_EN > 0
    #if OS_STK_GROWTH == 1
    (void)OSTaskCreateExt(OS_TaskStat,
                          (void *)0,                                   /* No args passed to OS_TaskStat()*/
                          &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
    (void)OSTaskCreateExt(OS_TaskStat,
                          (void *)0,                                   /* No args passed to OS_TaskStat()*/
                          &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
    (void)OSTaskCreate(OS_TaskStat,
                       (void *)0,                                      /* No args passed to OS_TaskStat()*/
                       &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],      /* Set Top-Of-Stack               */
                       OS_STAT_PRIO);                                  /* One higher than the idle task  */
    #else
    (void)OSTaskCreate(OS_TaskStat,
                       (void *)0,                                      /* No args passed to OS_TaskStat()*/
                       &OSTaskStatStk[0],                              /* Set Top-Of-Stack               */
                       OS_STAT_PRIO);                                  /* One higher than the idle task  */
    #endif
#endif

#if OS_TASK_NAME_SIZE > 14
    OSTaskNameSet(OS_STAT_PRIO, (INT8U *)"uC/OS-II Stat", &err);
#endif
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                             INITIALIZATION
*                            INITIALIZE THE FREE LIST OF TASK CONTROL BLOCKS
*
* Description: This function is called by OSInit() to initialize the free list of OS_TCBs.
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

static  void  OS_InitTCBList (void)
{
    INT8U    i;
    OS_TCB  *ptcb1;
    OS_TCB  *ptcb2;


    OS_MemClr((INT8U *)&OSTCBTbl[0],     sizeof(OSTCBTbl));      /* Clear all the TCBs                 */
    OS_MemClr((INT8U *)&OSTCBPrioTbl[0], sizeof(OSTCBPrioTbl));  /* Clear the priority table           */
    ptcb1 = &OSTCBTbl[0];
    ptcb2 = &OSTCBTbl[1];
    for (i = 0; i < (OS_MAX_TASKS + OS_N_SYS_TASKS - 1); i++) {  /* Init. list of free TCBs            */
        ptcb1->OSTCBNext = ptcb2;
#if OS_TASK_NAME_SIZE > 1
        ptcb1->OSTCBTaskName[0] = '?';                           /* Unknown name                       */
        ptcb1->OSTCBTaskName[1] = OS_ASCII_NUL;
#endif
        ptcb1++;
        ptcb2++;
    }
    ptcb1->OSTCBNext = (OS_TCB *)0;                              /* Last OS_TCB                        */
#if OS_TASK_NAME_SIZE > 1
    ptcb1->OSTCBTaskName[0] = '?';                               /* Unknown name                       */
    ptcb1->OSTCBTaskName[1] = OS_ASCII_NUL;
#endif
    OSTCBList               = (OS_TCB *)0;                       /* TCB lists initializations          */
    OSTCBFreeList           = &OSTCBTbl[0];
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        CLEAR A SECTION OF MEMORY
*
* Description: This function is called by other uC/OS-II services to clear a contiguous block of RAM.
*
* Arguments  : pdest    is the start of the RAM to clear (i.e. write 0x00 to)
*
*              size     is the number of bytes to clear.
*
* Returns    : none
*
* Notes      : 1) This function is INTERNAL to uC/OS-II and your application should not call it.
*              2) Note that we can only clear up to 64K bytes of RAM.  This is not an issue because none
*                 of the uses of this function gets close to this limit.
*              3) The clear is done one byte at a time since this will work on any processor irrespective
*                 of the alignment of the destination.
*********************************************************************************************************
*/

void  OS_MemClr (INT8U *pdest, INT16U size)
{
    while (size > 0) {
        *pdest++ = (INT8U)0;
        size--;
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        COPY A BLOCK OF MEMORY
*
* Description: This function is called by other uC/OS-II services to copy a block of memory from one
*              location to another.
*
* Arguments  : pdest    is a pointer to the 'destination' memory block
*
*              psrc     is a pointer to the 'source'      memory block
*
*              size     is the number of bytes to copy.
*
* Returns    : none
*
* Notes      : 1) This function is INTERNAL to uC/OS-II and your application should not call it.  There is
*                 no provision to handle overlapping memory copy.  However, that's not a problem since this
*                 is not a situation that will happen.
*              2) Note that we can only copy up to 64K bytes of RAM
*              3) The copy is done one byte at a time since this will work on any processor irrespective
*                 of the alignment of the source and destination.
*********************************************************************************************************
*/

void  OS_MemCopy (INT8U *pdest, INT8U *psrc, INT16U size)
{
    while (size > 0) {
        *pdest++ = *psrc++;
        size--;
    }
}
/*$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 OS_SchedLock())
*********************************************************************************************************
*/

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



    OS_ENTER_CRITICAL();
    if (OSIntNesting == 0) {                           /* Schedule only if all ISRs done and ...       */
        if (OSLockNesting == 0) {                      /* ... scheduler is 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++;                          /* Increment context switch counter             */
                OS_TASK_SW();                          /* Perform a context switch                     */
            }
        }
    }
    OS_EXIT_CRITICAL();
}


/*
*********************************************************************************************************
*                              FIND HIGHEST PRIORITY TASK READY TO RUN
*
* Description: This function is called by other uC/OS-II services to determine the highest priority task
*              that is ready to run.  The global variable 'OSPrioHighRdy' is changed accordingly.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) This function is INTERNAL to uC/OS-II and your application should not call it.
*              2) Interrupts are assumed to be disabled when this function is called.
*********************************************************************************************************
*/

static  void  OS_SchedNew (void)
{
#if OS_LOWEST_PRIO <= 63                         /* See if we support up to 64 tasks                   */
    INT8U   y;


    y             = OSUnMapTbl[OSRdyGrp];
    OSPrioHighRdy = (INT8U)((y << 3) + OSUnMapTbl[OSRdyTbl[y]]);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合成人精品亚洲另类欧美| 成人动漫中文字幕| 欧美久久久久免费| 久久福利视频一区二区| 欧美精品一区二区三区在线播放| 国内精品视频666| 国产精品久久久久影院| 欧美综合在线视频| 美女在线一区二区| 欧美高清在线视频| 欧美视频一区在线| 精品一区二区三区香蕉蜜桃 | 91精品国产91久久久久久一区二区 | 国产一区二区视频在线播放| 欧美国产欧美亚州国产日韩mv天天看完整| 99免费精品视频| 首页综合国产亚洲丝袜| 久久综合av免费| 97se亚洲国产综合在线| 亚洲123区在线观看| 精品国产一二三| 91小视频免费看| 乱一区二区av| 亚洲女性喷水在线观看一区| 6080国产精品一区二区| 国产高清在线观看免费不卡| 一区二区在线观看av| 日韩久久免费av| 色噜噜狠狠成人中文综合| 久久成人免费网站| 中文字幕日韩一区二区| 制服.丝袜.亚洲.中文.综合| 丰满少妇在线播放bd日韩电影| 一区二区三区不卡视频| 国产女同互慰高潮91漫画| 欧美日韩精品一区二区三区蜜桃 | 久久午夜羞羞影院免费观看| 色婷婷综合激情| 国产精品夜夜爽| 婷婷丁香激情综合| 亚洲视频免费观看| 久久精品夜夜夜夜久久| 8x8x8国产精品| 色噜噜夜夜夜综合网| 国产99久久久国产精品潘金| 婷婷国产在线综合| 亚洲一区二三区| 国产精品青草久久| 久久精品视频在线免费观看| 日韩一区二区在线免费观看| 91蜜桃婷婷狠狠久久综合9色| 精品一区二区免费在线观看| 亚洲午夜成aⅴ人片| 国产精品久久影院| 久久综合中文字幕| 日韩免费电影一区| 欧美日韩一二区| 日本高清不卡aⅴ免费网站| 国产成人在线看| 六月丁香婷婷久久| 美女性感视频久久| 亚洲1区2区3区视频| 亚洲激情在线激情| 亚洲色图制服诱惑| 国产精品乱人伦| 久久午夜羞羞影院免费观看| 欧美日韩国产精品自在自线| 欧美视频一区二区三区在线观看| 粉嫩av一区二区三区| 国产激情精品久久久第一区二区| 精品一区二区精品| 国产伦精品一区二区三区免费迷| 久久精品国产精品青草| 麻豆成人91精品二区三区| 日韩中文欧美在线| 麻豆91在线看| 国产综合色视频| 国产一区二区伦理| 国产白丝网站精品污在线入口| 国产精品亚洲а∨天堂免在线| 国产在线精品免费| 国产成人亚洲综合a∨婷婷| 国产91精品免费| 不卡的电影网站| 色哟哟国产精品| 欧美男人的天堂一二区| 欧美一区二区三区四区视频| 日韩一区二区三区四区五区六区| 在线91免费看| 精品成a人在线观看| 久久―日本道色综合久久| 久久精品无码一区二区三区| 中国色在线观看另类| 亚洲美女屁股眼交3| 亚洲成人动漫在线免费观看| 免费在线观看视频一区| 精品中文字幕一区二区| 成人自拍视频在线观看| 91福利视频久久久久| 欧美日韩www| 久久日韩粉嫩一区二区三区 | 91国产丝袜在线播放| 欧美精品视频www在线观看| 日韩一卡二卡三卡四卡| 久久精品一二三| 一区二区国产盗摄色噜噜| 美女久久久精品| 成人激情免费网站| 欧美日韩国产片| 国产欧美精品一区二区色综合朱莉 | 一本色道久久综合精品竹菊| 91麻豆精品国产综合久久久久久| 欧美精品一区二区在线观看| 亚洲欧美日韩国产一区二区三区| 天天做天天摸天天爽国产一区| 激情伊人五月天久久综合| fc2成人免费人成在线观看播放| 欧美精品免费视频| 国产精品全国免费观看高清| 五月婷婷久久丁香| 不卡高清视频专区| 欧美成人猛片aaaaaaa| 亚洲视频小说图片| 国产一区在线观看视频| 欧美怡红院视频| 亚洲国产精品成人综合| 日日夜夜精品免费视频| 不卡欧美aaaaa| 久久一二三国产| 日本最新不卡在线| 日本道精品一区二区三区 | 国产精品久久久久9999吃药| 日韩中文字幕一区二区三区| 99精品欧美一区二区蜜桃免费| 日韩午夜激情电影| 亚洲一区影音先锋| 99精品国产热久久91蜜凸| 日韩精品影音先锋| 五月天婷婷综合| 色综合天天综合网国产成人综合天| 欧美xxxx在线观看| 日本中文在线一区| 欧美日韩高清不卡| 亚洲女子a中天字幕| 成人动漫视频在线| 中文字幕av在线一区二区三区| 美女视频一区在线观看| 欧美日韩午夜精品| 亚洲精品v日韩精品| av在线这里只有精品| 国产视频在线观看一区二区三区 | 一区二区免费看| 91美女蜜桃在线| 国产精品对白交换视频| 国产精品亚洲专一区二区三区| 欧美电影在线免费观看| 亚洲一二三四区| 一本到三区不卡视频| 中文在线资源观看网站视频免费不卡 | 欧美精品一区二区三区四区| 青青草国产精品97视觉盛宴| 欧美精品国产精品| 婷婷综合久久一区二区三区| 欧美日韩和欧美的一区二区| 亚洲第一电影网| 欧美日高清视频| 日韩主播视频在线| 日韩精品专区在线影院观看| 麻豆视频观看网址久久| 精品久久久影院| 国产一区二区三区四区五区入口 | 久久免费国产精品| 国产91精品露脸国语对白| 亚洲国产精品国自产拍av| 成人美女在线观看| 亚洲乱码国产乱码精品精小说| 91成人在线精品| 日韩影院免费视频| 日韩欧美另类在线| 国产传媒日韩欧美成人| 国产精品久久久久久妇女6080 | 中文字幕日韩一区| 在线一区二区三区四区五区| 亚洲va欧美va天堂v国产综合| 欧美日韩国产首页在线观看| 日韩电影在线观看网站| 欧美videossexotv100| 国产成人在线看| 亚洲另类色综合网站| 欧美理论片在线| 国产精品99久久久久久宅男| 中文字幕亚洲在| 欧美日韩一区二区在线观看 | 天天色天天操综合| 久久久久97国产精华液好用吗| 91免费版在线| 奇米精品一区二区三区在线观看| 337p日本欧洲亚洲大胆精品| 不卡高清视频专区| 热久久国产精品|