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

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

?? os_task.c

?? ucosII在TMS320LF2407成功移植的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***********************************************************************************************************                                                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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久久| 日韩免费高清电影| 久久不见久久见中文字幕免费| 国产精品久久综合| 日韩精品一区二区在线观看| 色婷婷av一区二区三区大白胸| 国内精品第一页| 午夜天堂影视香蕉久久| 国产精品传媒在线| 久久久午夜精品| 日韩一区国产二区欧美三区| 91视视频在线直接观看在线看网页在线看| 久久精品国产一区二区三区免费看| 亚洲码国产岛国毛片在线| 2020日本不卡一区二区视频| 欧美日韩精品一区二区三区蜜桃 | 奇米色一区二区| 一区二区三区在线不卡| 国产日产亚洲精品系列| 日韩一区二区在线播放| 欧美精品乱码久久久久久 | 欧美成人三级在线| 欧美日韩国产美| 欧美亚洲综合一区| 成人精品小蝌蚪| 成人免费视频网站在线观看| 国产在线精品视频| 激情亚洲综合在线| 另类调教123区| 久草在线在线精品观看| 免费观看91视频大全| 一级中文字幕一区二区| 亚洲免费高清视频在线| 一区二区中文字幕在线| 亚洲国产精品成人综合色在线婷婷| 欧美xxxxx牲另类人与| 日韩一区二区三区精品视频 | 亚洲美腿欧美偷拍| 1024精品合集| 一区二区三区产品免费精品久久75| 中文字幕中文字幕中文字幕亚洲无线| 国产日韩三级在线| 国产精品剧情在线亚洲| 亚洲欧洲成人精品av97| 亚洲私人黄色宅男| 亚洲欧美电影院| 一区二区三区国产精品| 亚洲国产三级在线| 丝袜国产日韩另类美女| 视频一区二区三区在线| 蜜桃久久av一区| 捆绑调教美女网站视频一区| 美女国产一区二区三区| 国产美女在线观看一区| 国产成人超碰人人澡人人澡| av在线一区二区三区| 91看片淫黄大片一级在线观看| 欧美不卡一二三| www亚洲一区| 中文字幕一区三区| 亚洲国产一区二区视频| 久久精品国产精品亚洲红杏| 国产69精品久久777的优势| 色综合视频在线观看| 欧美日本精品一区二区三区| 日韩欧美专区在线| 亚洲国产激情av| 亚洲国产裸拍裸体视频在线观看乱了 | 国产精品一级二级三级| 成人蜜臀av电影| 色爱区综合激月婷婷| 欧美性色aⅴ视频一区日韩精品| 日韩精品一区二| 国产精品电影一区二区| 日韩av中文字幕一区二区三区| 国产精品一卡二| 欧美色图片你懂的| 26uuu国产日韩综合| 亚洲免费在线看| 久久99精品视频| 91美女片黄在线观看91美女| 日韩一区国产二区欧美三区| 国产精品超碰97尤物18| 日韩成人免费看| 成人av动漫网站| 欧美一区二区三区在线电影| 国产欧美日韩不卡免费| 亚洲国产日韩av| 豆国产96在线|亚洲| 欧美精品第1页| 中文字幕一区av| 麻豆国产欧美日韩综合精品二区 | 日本不卡视频一二三区| 成人av电影在线网| 日韩欧美黄色影院| 国产精品欧美一区喷水| 日韩精品1区2区3区| 99久久精品免费| 久久新电视剧免费观看| 亚洲第一搞黄网站| youjizz久久| 欧美r级在线观看| 亚洲成av人在线观看| 成人一区二区三区在线观看| 日韩区在线观看| 亚洲人成小说网站色在线 | 国产欧美日韩视频一区二区| 性久久久久久久久| 97精品国产露脸对白| 精品久久久久久久久久久久包黑料| 一区二区在线观看av| 国产美女精品人人做人人爽| 制服.丝袜.亚洲.中文.综合| 亚洲欧美日韩成人高清在线一区| 国产成人午夜精品影院观看视频| 7777精品伊人久久久大香线蕉超级流畅 | 中文字幕久久午夜不卡| 老鸭窝一区二区久久精品| 欧美私人免费视频| 亚洲精选视频在线| 不卡视频免费播放| 中文一区二区完整视频在线观看| 精品一区二区三区免费观看| 9191精品国产综合久久久久久| 亚洲自拍与偷拍| 91电影在线观看| 亚洲视频一区二区免费在线观看| 国产91精品一区二区麻豆网站| 久久综合九色综合欧美亚洲| 美女免费视频一区二区| 91精品国产91久久久久久一区二区 | 欧美精品自拍偷拍| 亚洲成人自拍偷拍| 欧美日韩在线电影| 亚洲国产中文字幕| 欧美少妇性性性| 亚洲一二三区不卡| 欧美在线视频不卡| 亚洲一级片在线观看| 在线观看日韩av先锋影音电影院| 亚洲人亚洲人成电影网站色| 91蝌蚪porny九色| 一区二区三区中文字幕| 欧美专区日韩专区| 午夜影视日本亚洲欧洲精品| 欧美精选在线播放| 蜜臀国产一区二区三区在线播放 | 中文字幕成人av| www.欧美日韩国产在线| 国产精品日韩成人| 91麻豆产精品久久久久久| 夜夜嗨av一区二区三区四季av | 国产色产综合色产在线视频| 国产成人精品亚洲日本在线桃色| 日本一区二区三区视频视频| 成人开心网精品视频| 亚洲欧洲日产国码二区| 欧美性三三影院| 免费观看久久久4p| 国产亚洲人成网站| 91在线国产观看| 日韩黄色小视频| 久久精品男人天堂av| www.欧美色图| 偷拍一区二区三区| 亚洲色图清纯唯美| 欧美日韩国产高清一区二区| 国产又黄又大久久| 中文字幕亚洲一区二区va在线| 欧美性大战久久久久久久| 看国产成人h片视频| 国产精品成人免费在线| 5月丁香婷婷综合| 国产电影一区二区三区| 亚洲精品日韩综合观看成人91| 欧美日韩国产系列| 国产精品18久久久| 一区二区三区在线视频观看| 欧美男女性生活在线直播观看| 国产一区二区电影| 亚洲精品日韩综合观看成人91| 91精品国产色综合久久久蜜香臀| 国产夫妻精品视频| 亚洲成人一二三| 国产午夜精品一区二区三区视频| 91国内精品野花午夜精品| 日本不卡一区二区| 国产精品免费人成网站| 欧美日韩国产精品成人| 国产成人aaa| 美女一区二区三区| 亚洲美女视频一区| 国产亚洲一区字幕| 欧美精品一卡二卡| 不卡一区二区在线| 麻豆成人在线观看| 亚洲综合免费观看高清完整版在线| 久久久久久久久久看片| 欧美日韩你懂得| 成人短视频下载|