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

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

?? os_core.c

?? 基于GE00 實驗系統開發板的實驗指導用途
?? C
?? 第 1 頁 / 共 5 頁
字號:
*              pname     is a pointer to an ASCII string that will be used as the name of the semaphore,
*                        mutex, mailbox or queue.  The string must be able to hold at least 
*                        OS_EVENT_NAME_SIZE characters.
*
*              err       is a pointer to an error code that can contain one of the following values:
*
*                        OS_NO_ERR                  if the requested task is resumed
*                        OS_ERR_EVENT_TYPE          if 'pevent' is not pointing to the proper event 
*                                                   control block type.
*                        OS_ERR_PNAME_NULL          You passed a NULL pointer for 'pname'
*                        OS_ERR_PEVENT_NULL         if you passed a NULL pointer for 'pevent'
*
* Returns    : None
*********************************************************************************************************
*/

#if OS_EVENT_NAME_SIZE > 0
void  OSEventNameSet (OS_EVENT *pevent, char *pname, INT8U *err)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif
    INT8U      len;


    OS_ENTER_CRITICAL();
#if OS_ARG_CHK_EN > 0
    if (pevent == (OS_EVENT *)0) {               /* Is 'pevent' a NULL pointer?                        */
        OS_EXIT_CRITICAL();                      /* Yes                                                */
        *err = OS_ERR_PEVENT_NULL;
        return;
    }
    if (pname == (char *)0) {                    /* Is 'pname' a NULL pointer?                         */
        OS_EXIT_CRITICAL();                      /* Yes                                                */
        *err = OS_ERR_PNAME_NULL;
        return;
    }
#endif
    switch (pevent->OSEventType) {
        case OS_EVENT_TYPE_SEM:
        case OS_EVENT_TYPE_MUTEX:
        case OS_EVENT_TYPE_MBOX:
        case OS_EVENT_TYPE_Q:
             break;

        default:
             OS_EXIT_CRITICAL();
             *err = OS_ERR_EVENT_TYPE;
             return;
    }
    len = strlen(pname);                         /* Can we fit the string in the storage area?         */
    if (len > (OS_EVENT_NAME_SIZE - 1)) {        /* No                                                 */
        OS_EXIT_CRITICAL();
        *err = OS_ERR_EVENT_NAME_TOO_LONG;
        return;
    } 
    (void)strcpy(pevent->OSEventName, pname);    /* Yes, copy name to the event control block          */
    OS_EXIT_CRITICAL();
    *err = OS_NO_ERR;
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                             INITIALIZATION
*
* Description: This function is used to initialize the internals of uC/OS-II and MUST be called prior to
*              creating any uC/OS-II object and, prior to calling OSStart().
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

void  OSInit (void)
{
#if OS_VERSION >= 204
    OSInitHookBegin();                                           /* Call port specific initialization code   */
#endif

    OS_InitMisc();                                               /* Initialize miscellaneous variables       */

    OS_InitRdyList();                                            /* Initialize the Ready List                */

    OS_InitTCBList();                                            /* Initialize the free list of OS_TCBs      */

    OS_InitEventList();                                          /* Initialize the free list of OS_EVENTs    */

#if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
    OS_FlagInit();                                               /* Initialize the event flag structures     */
#endif

#if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
    OS_MemInit();                                                /* Initialize the memory manager            */
#endif

#if (OS_Q_EN > 0) && (OS_MAX_QS > 0)
    OS_QInit();                                                  /* Initialize the message queue structures  */
#endif

    OS_InitTaskIdle();                                           /* Create the Idle Task                     */
#if OS_TASK_STAT_EN > 0
    OS_InitTaskStat();                                           /* Create the Statistic Task                */
#endif

#if OS_VERSION >= 204
    OSInitHookEnd();                                             /* Call port specific init. code            */
#endif
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                              ENTER ISR
*
* Description: This function is used to notify uC/OS-II that you are about to service an interrupt
*              service routine (ISR).  This allows uC/OS-II to keep track of interrupt nesting and thus
*              only perform rescheduling at the last nested ISR.
*
* 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 == 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;
#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.                      */
                OSIntExitY    = OSUnMapTbl[OSRdyGrp];          
                OSPrioHighRdy = (INT8U)((OSIntExitY << 3) + OSUnMapTbl[OSRdyTbl[OSIntExitY]]);
                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;
#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;
#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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区在线观看| 色美美综合视频| 色婷婷香蕉在线一区二区| 91 com成人网| 亚洲欧洲av色图| 久久国产欧美日韩精品| 色偷偷久久一区二区三区| 精品国产凹凸成av人导航| 亚洲精品国产a| proumb性欧美在线观看| 26uuu精品一区二区| 天堂va蜜桃一区二区三区漫画版| 99精品视频一区二区| 久久久国产一区二区三区四区小说 | 波多野结衣一区二区三区| 欧美三级中文字幕| 最新中文字幕一区二区三区| 另类中文字幕网| 337p亚洲精品色噜噜狠狠| 樱桃视频在线观看一区| 91在线你懂得| 中文字幕高清一区| 国产精品91xxx| 久久综合视频网| 激情综合色播五月| 日韩欧美色综合网站| 丝袜脚交一区二区| 欧美日韩国产一区二区三区地区| 亚洲欧美日韩在线| 国产成人av电影在线播放| 欧美性做爰猛烈叫床潮| 亚洲国产综合在线| 在线观看免费成人| 国产精品理伦片| 丁香天五香天堂综合| 国产欧美综合色| 国产91精品一区二区麻豆亚洲| 欧美国产一区在线| 99久久免费视频.com| 亚洲精品一二三四区| 欧美亚洲综合另类| 日产欧产美韩系列久久99| 日韩亚洲欧美综合| 国产一区二区不卡在线| 久久九九全国免费| 99久久精品免费精品国产| 亚洲欧美日韩在线播放| 欧美精选午夜久久久乱码6080| 免费日本视频一区| 欧美一区二区三区日韩| 亚洲精品日日夜夜| 97久久超碰国产精品电影| 久久精品久久精品| 福利一区二区在线观看| 亚洲老妇xxxxxx| 欧美视频精品在线观看| 日本欧美一区二区| 精品99999| 91老司机福利 在线| 天天综合色天天综合色h| 日韩视频永久免费| 成人91在线观看| 香蕉成人伊视频在线观看| 精品成人一区二区| 99精品热视频| 麻豆国产欧美一区二区三区| 中文字幕在线播放不卡一区| 欧美日韩精品免费观看视频| 狠狠网亚洲精品| 亚洲精品五月天| www国产精品av| 久久97超碰色| 首页国产欧美久久| 国产一区二区三区四区五区入口 | 亚洲精选一二三| 欧美肥妇free| 成人国产免费视频| 日本麻豆一区二区三区视频| 国产色婷婷亚洲99精品小说| 欧美日韩精品免费观看视频 | 中文字幕精品在线不卡| 91蝌蚪国产九色| 狠狠色狠狠色综合| 亚洲国产精品一区二区尤物区| 久久久久综合网| 在线播放91灌醉迷j高跟美女 | 九九九精品视频| 色综合久久天天| 欧美大尺度电影在线| 国产精品成人午夜| 一区二区国产视频| 久久综合色综合88| 欧美性色综合网| eeuss鲁片一区二区三区| 蜜臀av在线播放一区二区三区| 亚洲精品视频在线观看免费| 国产欧美视频一区二区三区| 日韩色视频在线观看| 欧美性猛交xxxx乱大交退制版| jlzzjlzz亚洲女人18| 国产精品亚洲综合一区在线观看| 三级影片在线观看欧美日韩一区二区| 亚洲精品va在线观看| 国产精品三级在线观看| 欧美国产精品一区二区三区| 欧美精品一区二区三区在线播放| 日韩午夜电影在线观看| 欧美日韩国产另类不卡| 91福利国产成人精品照片| 97精品久久久午夜一区二区三区| www.性欧美| 首页国产欧美日韩丝袜| 国产一区二区不卡| 久久综合久久久久88| 国产乱人伦精品一区二区在线观看 | 欧美午夜电影一区| 91蜜桃传媒精品久久久一区二区| 国产成人免费视频网站高清观看视频| 国产真实乱对白精彩久久| 韩国欧美国产1区| 国产伦精品一区二区三区免费迷| 国产一区二区三区高清播放| 国产福利一区二区三区视频在线| 国产高清精品在线| 成人精品国产一区二区4080| 成人免费黄色在线| 9久草视频在线视频精品| 色婷婷久久一区二区三区麻豆| 欧美无砖专区一中文字| 欧美日韩国产不卡| 精品福利一二区| 午夜欧美2019年伦理| 5月丁香婷婷综合| 国产精品一色哟哟哟| 精品污污网站免费看| 蜜臀av一区二区三区| 国产在线观看一区二区| 成人性视频免费网站| 一本一道久久a久久精品| 色综合久久综合网97色综合| 欧美无砖砖区免费| 久久综合资源网| 国产精品第13页| 亚洲国产成人av好男人在线观看| 麻豆免费看一区二区三区| 国产精品一区二区果冻传媒| 日本高清视频一区二区| 欧美电视剧免费观看| 国产午夜精品一区二区| 亚洲精品一二三| 国产一区二区三区日韩| 97久久精品人人澡人人爽| 日韩视频免费观看高清完整版| 国产女人aaa级久久久级| 亚洲一区二区影院| 国产一区二区主播在线| 午夜久久久久久电影| 日本欧美一区二区在线观看| 欧美男男青年gay1069videost| 91蝌蚪porny| 欧美一级理论性理论a| 国产精品日韩成人| 男男gaygay亚洲| 99精品久久免费看蜜臀剧情介绍| 欧美一级日韩一级| 亚洲欧美乱综合| 国产美女一区二区三区| 欧美日韩在线综合| 中文字幕一区二区三区精华液| 男男视频亚洲欧美| 欧美三级日韩三级| 国产亚洲精品超碰| 青青草精品视频| 在线亚洲+欧美+日本专区| 中文字幕av一区二区三区免费看 | 成人小视频免费在线观看| 日韩一区二区三区观看| 亚洲一二三四在线| 成人永久免费视频| 久久精品亚洲国产奇米99| 日韩国产在线观看| 欧美网站大全在线观看| 久久精子c满五个校花| 蜜臀av一区二区| 裸体在线国模精品偷拍| 91精品国产91热久久久做人人| 成年人午夜久久久| 九一久久久久久| 欧美精品日韩一本| 一区2区3区在线看| 色哟哟国产精品免费观看| 国产精品国产a| 成人性生交大片免费看中文| 国产亚洲欧美激情| 国产成人免费视频精品含羞草妖精| 欧美电影免费观看高清完整版在| 午夜精品福利在线| 在线播放91灌醉迷j高跟美女| 天天影视涩香欲综合网| 欧美日韩成人激情|