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

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

?? os_core.c

?? ucos2 移植到44b0 上的源代碼,支持中斷嵌套,調(diào)試通過.
?? C
?? 第 1 頁 / 共 5 頁
字號:
*                        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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美一区二区三区国产精品| 精品一区二区三区在线观看国产 | 宅男噜噜噜66一区二区66| 日韩精品自拍偷拍| 亚洲精品中文字幕在线观看| 美国十次了思思久久精品导航| 99久久婷婷国产综合精品电影 | 国产一区在线观看视频| 91一区二区三区在线观看| 亚洲精品一区二区在线观看| 亚洲一区二区三区视频在线播放| 国产经典欧美精品| 欧美一区二区成人6969| 亚洲国产va精品久久久不卡综合| aaa亚洲精品| 日本一区二区综合亚洲| 精品一区二区三区蜜桃| 91.com视频| 视频一区欧美日韩| 欧日韩精品视频| 一区二区三区在线观看网站| 成人免费电影视频| 欧美经典一区二区三区| 国产中文字幕精品| xnxx国产精品| 韩国精品主播一区二区在线观看| 欧美一区二区三区四区在线观看 | 91老师片黄在线观看| 国产精品色噜噜| www.亚洲在线| 国产精品电影院| bt7086福利一区国产| 国产精品美女久久久久久久| 成人美女视频在线看| 国产精品污www在线观看| 高清不卡一区二区| 国产精品婷婷午夜在线观看| 懂色av一区二区三区免费观看| 久久精品亚洲精品国产欧美| 国产大陆亚洲精品国产| 中日韩av电影| 色噜噜久久综合| 亚洲成人黄色小说| 日韩一级片在线观看| 激情五月婷婷综合| 国产精品你懂的| 在线精品视频免费播放| 午夜电影网一区| 精品国产一区二区三区久久影院| 国产又黄又大久久| 国产精品国产三级国产aⅴ原创| 91农村精品一区二区在线| 亚洲最色的网站| 欧美一级视频精品观看| 韩国三级电影一区二区| 亚洲欧美在线aaa| 欧美熟乱第一页| 国产在线一区观看| 成人免费在线观看入口| 欧美精品在线观看一区二区| 国产在线不卡视频| 亚洲精品久久久久久国产精华液| 51午夜精品国产| 岛国一区二区三区| 亚洲国产另类av| 久久嫩草精品久久久精品一| www.在线成人| 免费观看日韩av| 日韩久久一区二区| 日韩欧美一区在线观看| 99视频国产精品| 美女视频第一区二区三区免费观看网站| 久久一二三国产| 在线日韩av片| 国产成人av影院| 日韩国产欧美在线播放| 国产精品人妖ts系列视频| 欧美群妇大交群中文字幕| 国产精品一卡二卡在线观看| 午夜伊人狠狠久久| 中文一区一区三区高中清不卡| 欧美日韩一二区| 福利91精品一区二区三区| 日本欧美加勒比视频| 最新不卡av在线| 久久久亚洲午夜电影| 欧美日韩国产bt| 99精品一区二区三区| 另类小说图片综合网| 伊人婷婷欧美激情| 中文字幕av一区二区三区免费看| 欧美一区二区三区在线视频| 91福利在线看| zzijzzij亚洲日本少妇熟睡| 国产资源在线一区| 美腿丝袜亚洲色图| 午夜精品影院在线观看| 亚洲伦理在线精品| 国产精品色婷婷| 久久久久九九视频| 日韩一卡二卡三卡四卡| 欧美日韩精品欧美日韩精品一 | 肉色丝袜一区二区| 亚洲一区二区综合| 亚洲免费在线看| 亚洲天堂成人在线观看| 日本一区二区电影| 国产精品丝袜一区| 久久精品综合网| 久久色.com| 精品国产百合女同互慰| 日韩精品在线一区| 欧美大片在线观看一区二区| 91精品国产aⅴ一区二区| 8x福利精品第一导航| 欧美日韩mp4| 91精品国产综合久久久久久久| 制服丝袜亚洲色图| 7777精品伊人久久久大香线蕉超级流畅 | 一区二区免费看| 亚洲午夜影视影院在线观看| 亚洲国产成人av网| 美女一区二区视频| 国产毛片精品视频| 国产91丝袜在线播放0| 成人黄页在线观看| 色av综合在线| 欧美午夜一区二区三区| 制服丝袜一区二区三区| 日韩视频免费观看高清完整版在线观看 | xfplay精品久久| 日本一区二区不卡视频| 日韩美女视频一区二区| 亚洲第一久久影院| 久久精品国产秦先生| 国产高清无密码一区二区三区| 波波电影院一区二区三区| 91福利视频网站| 日韩欧美第一区| 欧美国产日韩一二三区| 亚洲精品免费在线| 日本欧美一区二区| 成人污视频在线观看| 色婷婷久久99综合精品jk白丝| 欧美日韩美少妇| 国产视频一区在线观看 | 91麻豆自制传媒国产之光| 欧美日韩专区在线| 久久综合久久99| 亚洲免费伊人电影| 视频一区欧美日韩| 国产成人av福利| 欧美在线高清视频| 久久品道一品道久久精品| 亚洲乱码国产乱码精品精可以看| 天天色综合天天| 成人av在线资源网| 欧美一区二区精美| 亚洲欧美综合网| 激情国产一区二区| 欧美性受极品xxxx喷水| 国产日韩欧美精品电影三级在线| 亚洲国产一区在线观看| 国产乱码精品一区二区三区五月婷| 色婷婷av一区二区三区大白胸| 日韩欧美一级在线播放| 亚洲嫩草精品久久| 国产精品一区二区黑丝| 精品视频一区三区九区| 国产精品嫩草99a| 精品在线播放免费| 欧美日韩一区二区在线视频| 国产精品成人免费在线| 精品一区免费av| 欧美剧情片在线观看| 亚洲色图20p| 成人免费看视频| 久久综合九色综合97婷婷女人| 香蕉影视欧美成人| 色婷婷精品久久二区二区蜜臂av| 久久五月婷婷丁香社区| 麻豆精品一区二区三区| 欧美日韩不卡在线| 一区2区3区在线看| 91欧美一区二区| 18成人在线观看| 成人免费高清视频在线观看| wwwwxxxxx欧美| 精品中文av资源站在线观看| 欧美一区二区三区日韩视频| 亚洲国产aⅴ成人精品无吗| 色综合久久88色综合天天| 亚洲人妖av一区二区| 成人激情免费网站| 国产精品天美传媒| 成人黄页毛片网站| 国产精品高潮呻吟| eeuss国产一区二区三区| 国产精品久久久久久久岛一牛影视 | 一级特黄大欧美久久久|