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

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

?? os_core.c

?? uCOS-II在三星44B0開發(fā)板上的移植
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
*                        matter the actual type.
*
*              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.
*********************************************************************************************************
*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色菇凉天天综合网| 色综合天天做天天爱| 激情都市一区二区| 懂色中文一区二区在线播放| 成人午夜免费电影| 在线视频一区二区三| 欧美日韩在线免费视频| 日韩免费在线观看| 久久精品一级爱片| 亚洲婷婷综合久久一本伊一区| 国产精品久久久久久亚洲伦| 亚洲第一av色| 久久国产欧美日韩精品| 成人白浆超碰人人人人| 色婷婷激情久久| 日韩精品一区二区三区在线| 国产亚洲综合色| 亚洲乱码中文字幕综合| 亚洲韩国一区二区三区| 国内精品伊人久久久久av影院| 成人免费视频播放| 色噜噜久久综合| 91精品国产综合久久精品性色| 国产女主播在线一区二区| 不卡视频免费播放| 欧美日韩一区二区三区四区| 欧美va亚洲va| 亚洲日本在线视频观看| 亚洲永久精品国产| 久久精品99国产精品日本| 国产精品亚洲а∨天堂免在线| 色婷婷久久久综合中文字幕| 日韩三区在线观看| 自拍偷拍亚洲欧美日韩| 亚洲精品国产无天堂网2021| 日韩欧美国产一区二区三区 | bt7086福利一区国产| 欧美色图天堂网| 国产午夜亚洲精品不卡| 中文字幕一区二区三中文字幕| 久久精品国产网站| av高清久久久| 精品美女在线观看| 日韩中文字幕一区二区三区| 成人精品gif动图一区| 欧美疯狂性受xxxxx喷水图片| 国产精品沙发午睡系列990531| 亚洲第一福利一区| caoporn国产一区二区| 精品国产乱码久久久久久夜甘婷婷 | 久久久久久久电影| 青青国产91久久久久久| 色婷婷综合久久久久中文| 91 com成人网| 亚洲黄一区二区三区| 国产盗摄视频一区二区三区| 69堂精品视频| 亚洲美女少妇撒尿| 国产成人午夜视频| 日韩欧美精品在线视频| 一区二区三区高清不卡| 99麻豆久久久国产精品免费 | 亚洲电影第三页| www.日韩大片| 国产精品久久久久四虎| 国产乱对白刺激视频不卡| 91麻豆福利精品推荐| 久久精品综合网| 国产超碰在线一区| 久久久久久久久岛国免费| 久久国产综合精品| 日韩欧美在线网站| 亚洲大型综合色站| 在线看日本不卡| 久久女同精品一区二区| 国内成人精品2018免费看| 日韩无一区二区| 青青草成人在线观看| 欧美日韩成人综合天天影院| 亚洲午夜成aⅴ人片| 在线亚洲免费视频| 亚洲视频 欧洲视频| 在线亚洲免费视频| 亚洲专区一二三| 欧美性感一区二区三区| 同产精品九九九| 欧美日韩精品一区二区三区四区| 夜夜嗨av一区二区三区四季av| 亚洲精品老司机| 欧美日韩高清一区二区| 日日摸夜夜添夜夜添亚洲女人| 欧美日韩二区三区| 老汉av免费一区二区三区| 欧美一区二区三级| 激情文学综合丁香| 久久精品亚洲乱码伦伦中文| av一区二区不卡| 一区二区三区鲁丝不卡| 91黄视频在线观看| 日本不卡一区二区| 精品精品欲导航| 国产成人啪免费观看软件| 久久精品一区二区三区av| 91在线看国产| 亚洲一区二区av在线| 欧美丝袜第三区| 久久aⅴ国产欧美74aaa| 久久综合99re88久久爱| 亚洲综合色噜噜狠狠| 777奇米成人网| 狠狠色狠狠色合久久伊人| 国产三级一区二区| 不卡视频一二三| 亚洲在线成人精品| 91精品国产综合久久久蜜臀粉嫩| 久久99国产精品成人| ...av二区三区久久精品| 欧美日韩综合色| 蜜乳av一区二区三区| 精品美女一区二区| 91福利视频久久久久| 日本亚洲最大的色成网站www| 日韩亚洲国产中文字幕欧美| 99久久免费国产| 日韩高清一区二区| 久久伊99综合婷婷久久伊| www.亚洲色图.com| 蜜臀av国产精品久久久久 | 成人开心网精品视频| 国产精品激情偷乱一区二区∴| 欧美日韩一本到| 国产精品亚洲成人| 一区二区三区中文免费| 欧美福利视频导航| 91年精品国产| 裸体在线国模精品偷拍| 国产精品久久久久久久第一福利| 欧美日本一区二区三区四区| 国产美女久久久久| 夜夜嗨av一区二区三区网页| 精品国产一区二区三区四区四| 成人在线一区二区三区| 午夜在线电影亚洲一区| 国产日韩欧美a| 在线不卡a资源高清| 国产成人在线视频免费播放| 亚洲欧美日韩中文字幕一区二区三区 | 色综合久久久久综合体| 精彩视频一区二区| 日韩精品色哟哟| 一区av在线播放| 国产精品女人毛片| 久久只精品国产| 日韩精品一区二区三区在线观看 | 亚洲国产色一区| 中文字幕视频一区| 久久久精品免费网站| 日韩一区二区三区视频在线| 91精品办公室少妇高潮对白| 成人av高清在线| 福利视频网站一区二区三区| 国产在线播放一区二区三区| 日韩高清不卡一区二区三区| 亚洲一区免费观看| 一区二区视频在线| 国产无人区一区二区三区| 精品国产电影一区二区| 欧美一区二区三区的| 欧美一区中文字幕| 欧美日韩成人综合天天影院| 精品视频一区三区九区| 一本大道久久a久久精二百| 不卡一区二区中文字幕| 不卡高清视频专区| 成人久久视频在线观看| 丁香六月久久综合狠狠色| 国产福利一区二区三区| 国产乱人伦精品一区二区在线观看 | 欧美影院一区二区三区| 色美美综合视频| 日本精品视频一区二区| 在线观看国产一区二区| 在线亚洲高清视频| 欧美三片在线视频观看| 欧美精选一区二区| 日韩三级在线观看| 精品国产一区二区在线观看| 久久夜色精品国产噜噜av| 久久噜噜亚洲综合| 国产精品你懂的| 一区二区三区免费| 亚洲成人午夜电影| 奇米精品一区二区三区四区| 久久精品国产**网站演员| 国产一区二区免费在线| 国产精品12区| 91蝌蚪国产九色| 欧美色网一区二区| 日韩一级在线观看| 久久这里只有精品首页|