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

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

?? os_task.c

?? 本文介紹了_C/OS-II概況和ARM體系結(jié)構(gòu)中與移植工作相關(guān)的一些概念
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/***********************************************************************************************************                                                uC/OS-II*                                          The Real-Time Kernel*                                            TASK MANAGEMENT**                        (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL*                                           All Rights Reserved**                                                  V2.00** File : OS_TASK.C* By   : Jean J. Labrosse**********************************************************************************************************/#ifndef  OS_MASTER_FILE#include "includes.h"#endif/***********************************************************************************************************                                        LOCAL FUNCTION PROTOTYPES**********************************************************************************************************/static  void  OSDummy(void);/***********************************************************************************************************                                            DUMMY FUNCTION** Description: This function doesn't do anything.  It is called by OSTaskDel() to ensure that interrupts*              are disabled immediately after they are enabled.** Arguments  : none** Returns    : none**********************************************************************************************************/static void  OSDummy (void){}/*$PAGE*//***********************************************************************************************************                                        CHANGE PRIORITY OF A TASK** Description: This function allows you to change the priority of a task dynamically.  Note that the new*              priority MUST be available.** Arguments  : oldp     is the old priority**              newp     is the new priority** Returns    : OS_NO_ERR        is the call was successful*              OS_PRIO_INVALID  if the priority you specify is higher that the maximum allowed *                               (i.e. >= OS_LOWEST_PRIO)*              OS_PRIO_EXIST    if the new priority already exist.*              OS_PRIO_ERR      there is no task with the specified OLD priority (i.e. the OLD task does*                               not exist.**********************************************************************************************************/#if OS_TASK_CHANGE_PRIO_ENINT8U OSTaskChangePrio (INT8U oldprio, INT8U newprio){    OS_TCB   *ptcb;    OS_EVENT *pevent;    INT8U     x;    INT8U     y;    INT8U     bitx;    INT8U     bity;    if ((oldprio >= OS_LOWEST_PRIO && oldprio != OS_PRIO_SELF)  ||          newprio >= OS_LOWEST_PRIO) {        return (OS_PRIO_INVALID);    }    OS_ENTER_CRITICAL();    if (OSTCBPrioTbl[newprio] != (OS_TCB *)0) {                 /* New priority must not already exist */        OS_EXIT_CRITICAL();        return (OS_PRIO_EXIST);    } else {        OSTCBPrioTbl[newprio] = (OS_TCB *)1;                    /* Reserve the entry to prevent others */        OS_EXIT_CRITICAL();        y    = newprio >> 3;                                    /* Precompute to reduce INT. latency   */        bity = OSMapTbl[y];        x    = newprio & 0x07;        bitx = OSMapTbl[x];        OS_ENTER_CRITICAL();        if (oldprio == OS_PRIO_SELF) {                          /* See if changing self                */            oldprio = OSTCBCur->OSTCBPrio;                      /* Yes, get priority                   */        }        if ((ptcb = OSTCBPrioTbl[oldprio]) != (OS_TCB *)0) {    /* Task to change must exist           */            OSTCBPrioTbl[oldprio] = (OS_TCB *)0;                /* Remove TCB from old priority        */            if (OSRdyTbl[ptcb->OSTCBY] & ptcb->OSTCBBitX) {     /* If task is ready make it not ready  */                if ((OSRdyTbl[ptcb->OSTCBY] &= ~ptcb->OSTCBBitX) == 0) {                    OSRdyGrp &= ~ptcb->OSTCBBitY;                }                OSRdyGrp    |= bity;                            /* Make new priority ready to run      */                OSRdyTbl[y] |= bitx;            } else {                if ((pevent = ptcb->OSTCBEventPtr) != (OS_EVENT *)0) { /* Remove from event wait list  */                    if ((pevent->OSEventTbl[ptcb->OSTCBY] &= ~ptcb->OSTCBBitX) == 0) {                        pevent->OSEventGrp &= ~ptcb->OSTCBBitY;                    }                    pevent->OSEventGrp    |= bity;              /* Add new priority to wait list       */                    pevent->OSEventTbl[y] |= bitx;                }            }            OSTCBPrioTbl[newprio] = ptcb;                       /* Place pointer to TCB @ new priority */            ptcb->OSTCBPrio       = newprio;                    /* Set new task priority               */            ptcb->OSTCBY          = y;            ptcb->OSTCBX          = x;            ptcb->OSTCBBitY       = bity;            ptcb->OSTCBBitX       = bitx;            OS_EXIT_CRITICAL();            OSSched();                                          /* Run highest priority task ready     */            return (OS_NO_ERR);        } else {            OSTCBPrioTbl[newprio] = (OS_TCB *)0;                /* Release the reserved prio.          */            OS_EXIT_CRITICAL();            return (OS_PRIO_ERR);                               /* Task to change didn't exist         */        }    }}#endif/*$PAGE*//***********************************************************************************************************                                            CREATE A TASK** Description: This function is used to have uC/OS-II manage the execution of a task.  Tasks can either*              be created prior to the start of multitasking or by a running task.  A task cannot be*              created by an ISR.** Arguments  : task     is a pointer to the task's code**              pdata    is a pointer to an optional data area which can be used to pass parameters to*                       the task when the task first executes.  Where the task is concerned it thinks*                       it was invoked and passed the argument 'pdata' as follows:**                           void Task (void *pdata)*                           {*                               for (;;) {*                                   Task code;*                               }*                           }**              ptos     is a pointer to the task's top of stack.  If the configuration constant *                       OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high*                       memory to low memory).  'pstk' will thus point to the highest (valid) memory *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pstk' will point to the *                       lowest memory location of the stack and the stack will grow with increasing*                       memory locations.**              prio     is the task's priority.  A unique priority MUST be assigned to each task and the*                       lower the number, the higher the priority.** Returns    : OS_NO_ERR        if the function was successful.*              OS_PRIO_EXIT     if the task priority already exist *                               (each task MUST have a unique priority).*              OS_PRIO_INVALID  if the priority you specify is higher that the maximum allowed *                               (i.e. >= OS_LOWEST_PRIO)**********************************************************************************************************/#if OS_TASK_CREATE_ENINT8U OSTaskCreate (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT8U prio){    void   *psp;    INT8U   err;    if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */        return (OS_PRIO_INVALID);    }    OS_ENTER_CRITICAL();    if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */        OSTCBPrioTbl[prio] = (OS_TCB *)1;    /* Reserve the priority to prevent others from doing ...  */                                             /* ... the same thing until task is created.              */        OS_EXIT_CRITICAL();        psp = (void *)OSTaskStkInit(task, pdata, ptos, 0); /* Initialize the task's stack              */        err = OSTCBInit(prio, psp, (void *)0, 0, 0, (void *)0, 0);                 if (err == OS_NO_ERR) {            OS_ENTER_CRITICAL();            OSTaskCtr++;                                   /* Increment the #tasks counter             */            OSTaskCreateHook(OSTCBPrioTbl[prio]);          /* Call user defined hook                   */            OS_EXIT_CRITICAL();            if (OSRunning) {                 /* Find highest priority task if multitasking has started */                OSSched();            }        } else {            OS_ENTER_CRITICAL();            OSTCBPrioTbl[prio] = (OS_TCB *)0;/* Make this priority available to others                 */            OS_EXIT_CRITICAL();        }        return (err);    } else {        OS_EXIT_CRITICAL();        return (OS_PRIO_EXIST);    }}#endif/*$PAGE*//***********************************************************************************************************                                     CREATE A TASK (Extended Version)** Description: This function is used to have uC/OS-II manage the execution of a task.  Tasks can either*              be created prior to the start of multitasking or by a running task.  A task cannot be*              created by an ISR.  This function is similar to OSTaskCreate() except that it allows*              additional information about a task to be specified.** Arguments  : task     is a pointer to the task's code**              pdata    is a pointer to an optional data area which can be used to pass parameters to*                       the task when the task first executes.  Where the task is concerned it thinks*                       it was invoked and passed the argument 'pdata' as follows:**                           void Task (void *pdata)*                           {*                               for (;;) {*                                   Task code;*                               }*                           }**              ptos     is a pointer to the task's top of stack.  If the configuration constant *                       OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high*                       memory to low memory).  'pstk' will thus point to the highest (valid) memory *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pstk' will point to the *                       lowest memory location of the stack and the stack will grow with increasing*                       memory locations.  'pstk' MUST point to a valid 'free' data item.**              prio     is the task's priority.  A unique priority MUST be assigned to each task and the*                       lower the number, the higher the priority.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二| 青娱乐精品视频| 成人精品视频一区| 国产亚洲自拍一区| 国产麻豆午夜三级精品| 日韩一区二区电影| 日本欧美韩国一区三区| 欧美日韩在线综合| 亚洲乱码中文字幕| 91浏览器在线视频| 亚洲激情欧美激情| 色一区在线观看| 亚洲精品国产a| 欧美在线色视频| 亚洲成人av免费| 欧美人妇做爰xxxⅹ性高电影| 亚洲午夜精品久久久久久久久| 在线看国产一区二区| 亚洲精品久久7777| 欧美色图激情小说| 亚洲成人av一区| 91精品国产综合久久久久久漫画 | 国产精品美女久久久久av爽李琼| 国产a级毛片一区| 国产肉丝袜一区二区| 成人高清视频免费观看| 综合亚洲深深色噜噜狠狠网站| 91麻豆.com| 午夜影院久久久| 日韩三级免费观看| 国产精品夜夜嗨| 国产精品麻豆网站| 91久久久免费一区二区| 午夜免费久久看| 日韩一区二区电影| 国产精品一区二区在线播放| 中文字幕欧美区| 色婷婷国产精品综合在线观看| 亚洲大片在线观看| 精品入口麻豆88视频| 成人在线综合网| 亚洲男人的天堂av| 在线播放亚洲一区| 国产精一品亚洲二区在线视频| 国产精品久久福利| 欧美色图片你懂的| 麻豆视频一区二区| 欧美国产乱子伦| 91福利视频久久久久| 日韩成人免费电影| 国产午夜精品一区二区 | 懂色av一区二区夜夜嗨| 亚洲精选免费视频| 日韩欧美成人午夜| jlzzjlzz亚洲女人18| 亚洲综合免费观看高清完整版 | 国产精品久久免费看| 欧美三级一区二区| 国产一区福利在线| 综合久久久久综合| 欧美大片在线观看一区| 成人av片在线观看| 日韩综合小视频| 国产欧美日韩另类一区| 欧美日韩高清影院| 国产电影一区二区三区| 亚洲无线码一区二区三区| 久久久久久久综合日本| 欧洲一区二区av| 国产精品亚洲成人| 亚洲小说欧美激情另类| 国产天堂亚洲国产碰碰| 欧美日韩一区三区四区| 国产成人免费在线视频| 亚洲成人av资源| 国产精品乱码一区二三区小蝌蚪| 欧美精品自拍偷拍动漫精品| 国产成人在线免费| 午夜精品爽啪视频| 国产精品嫩草影院av蜜臀| 制服丝袜亚洲色图| 成人av电影免费在线播放| 日产精品久久久久久久性色| 国产精品色哟哟网站| 日韩丝袜美女视频| 色国产精品一区在线观看| 国产精品一区二区三区四区| 偷拍日韩校园综合在线| 国产精品国产成人国产三级 | 久久精品视频在线看| 欧美卡1卡2卡| heyzo一本久久综合| 韩国一区二区三区| 秋霞成人午夜伦在线观看| 亚洲另类在线一区| 中文字幕欧美日本乱码一线二线 | 91国偷自产一区二区开放时间| 国产又黄又大久久| 日韩激情av在线| 亚洲已满18点击进入久久| 中文字幕不卡的av| 久久中文娱乐网| 欧美一级电影网站| 欧洲精品中文字幕| 91丨九色丨国产丨porny| 国产精品中文有码| 狠狠色丁香久久婷婷综合丁香| 香蕉久久夜色精品国产使用方法| 亚洲丝袜美腿综合| 中文字幕在线一区| 国产亚洲欧美在线| 久久久久久久免费视频了| 欧美电影免费观看高清完整版在线| 欧美日韩免费观看一区二区三区| 99精品久久久久久| 北岛玲一区二区三区四区| 国产一区二区三区美女| 男女男精品视频| 奇米影视在线99精品| 午夜精品久久久久影视| 亚洲在线视频一区| 一二三区精品视频| 夜夜嗨av一区二区三区中文字幕 | 波多野结衣中文一区| 国产激情一区二区三区桃花岛亚洲| 日本不卡的三区四区五区| 亚洲第一搞黄网站| 亚洲大片精品永久免费| 亚洲成人手机在线| 亚洲成人激情社区| 偷拍日韩校园综合在线| 婷婷中文字幕综合| 肉肉av福利一精品导航| 婷婷综合另类小说色区| 日韩国产一区二| 日韩国产欧美三级| 蜜桃免费网站一区二区三区| 日本va欧美va精品| 免费成人美女在线观看| 精品一二三四在线| 国产精品资源站在线| 国产91丝袜在线观看| 成人一级片在线观看| av一区二区三区黑人| 91在线精品秘密一区二区| 色综合激情久久| 欧美性受xxxx黑人xyx| 在线电影院国产精品| 日韩欧美亚洲一区二区| 久久综合一区二区| 久久久91精品国产一区二区三区| 久久久精品国产免费观看同学| 欧美经典一区二区三区| 中文字幕av在线一区二区三区| 中文字幕在线一区| 亚洲已满18点击进入久久| 日韩国产在线观看| 国产一区二区三区| 成人国产精品免费观看| 色激情天天射综合网| 欧美精品日韩一本| ww亚洲ww在线观看国产| 国产精品毛片久久久久久| 亚洲精品成人悠悠色影视| 亚洲高清视频中文字幕| 精品影视av免费| 成人听书哪个软件好| 在线视频国内自拍亚洲视频| 欧美精品xxxxbbbb| 久久久久高清精品| **欧美大码日韩| 午夜精品福利在线| 国产精品影视天天线| 99精品国产视频| 88在线观看91蜜桃国自产| 久久久影院官网| 一区二区三区四区国产精品| 日韩综合小视频| 国产福利精品一区二区| 欧美性受xxxx| 久久综合给合久久狠狠狠97色69| 中文字幕佐山爱一区二区免费| 午夜精品久久久久久久蜜桃app| 韩国三级在线一区| 91在线视频18| 日韩欧美国产系列| 综合色天天鬼久久鬼色| 日本vs亚洲vs韩国一区三区二区| 国产.精品.日韩.另类.中文.在线.播放 | 亚洲夂夂婷婷色拍ww47| 国内精品自线一区二区三区视频| 99精品国产热久久91蜜凸| 欧美一二三区精品| 亚洲人成精品久久久久| 蜜桃av噜噜一区| 91美女福利视频| 精品国产sm最大网站免费看| 亚洲视频每日更新| 久久国产精品色| 色婷婷综合久久|