亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久奇米777| 国产视频911| 在线观看成人小视频| 久久99精品国产麻豆婷婷| 亚洲一区在线视频观看| 国产欧美在线观看一区| 日韩午夜精品视频| 欧美日韩久久不卡| 欧美自拍丝袜亚洲| 91成人网在线| 91美女视频网站| 成人美女视频在线看| 国产成人av福利| 国内精品国产三级国产a久久| 久久国产尿小便嘘嘘尿| 麻豆精品在线播放| 精品一区二区三区在线观看 | 一区二区三区精品久久久| 国产午夜一区二区三区| 久久精品视频一区二区| 中文字幕第一区第二区| 国产欧美日韩激情| 中文字幕佐山爱一区二区免费| 136国产福利精品导航| 一片黄亚洲嫩模| 亚洲成人激情社区| 久久综合综合久久综合| 国产一区二区不卡| www.99精品| 欧美日韩国产大片| 日韩精品一区二区三区四区 | 色哟哟国产精品| 91精品久久久久久蜜臀| 亚洲一区在线观看免费| 国产精品国产三级国产aⅴ中文| 亚洲欧美一区二区三区久本道91| 亚洲国产日韩一区二区| 国产一区视频在线看| 91视频免费播放| 亚洲午夜一区二区三区| 国产在线国偷精品产拍免费yy| 色先锋aa成人| 国产精品美女一区二区在线观看| 亚洲午夜久久久久久久久电影院| 久久99久久99精品免视看婷婷| 不卡视频免费播放| 久久―日本道色综合久久| 亚洲黄色片在线观看| 成人午夜av在线| 精品免费日韩av| 日本不卡视频在线观看| 91福利视频久久久久| 中文字幕av一区二区三区| 极品美女销魂一区二区三区| 91精品久久久久久久99蜜桃| 亚洲综合无码一区二区| 91在线视频观看| 亚洲国产高清不卡| 国产91色综合久久免费分享| 精品国免费一区二区三区| 日本不卡中文字幕| 欧美日韩国产免费一区二区| 亚洲欧美日韩成人高清在线一区| www.66久久| 亚洲综合在线观看视频| 精品视频免费看| 香蕉久久夜色精品国产使用方法 | 国产成人av一区二区三区在线 | 国产成人av网站| 中文字幕精品综合| 成人动漫av在线| 亚洲精品国产视频| 久久久www成人免费无遮挡大片| 免费高清在线视频一区·| 欧美精品在线观看一区二区| 香蕉久久一区二区不卡无毒影院| 欧美丰满美乳xxx高潮www| 日韩成人一区二区| 精品久久久久久久久久久久久久久| 国产在线精品免费| 亚洲国产精品ⅴa在线观看| 丰满放荡岳乱妇91ww| 一区二区三区加勒比av| 精品国产第一区二区三区观看体验| 欧美一区二区三区不卡| 国产精品一级片| 亚洲综合丁香婷婷六月香| 91精品福利在线一区二区三区 | 国产一区二区在线看| 亚洲欧美日韩国产另类专区| 欧美一级久久久久久久大片| 高清成人免费视频| 麻豆一区二区在线| 亚洲激情一二三区| 久久久久国产精品麻豆| 精品视频在线视频| av网站免费线看精品| 久久99精品久久久久久| 亚洲高清免费观看| 国产精品久久久久国产精品日日| 国产亚洲精品久| 欧美午夜免费电影| 成人永久aaa| 国产在线精品一区二区夜色 | 另类欧美日韩国产在线| 一二三四区精品视频| 国产精品国产自产拍在线| 久久久蜜桃精品| 久久精品夜夜夜夜久久| 欧美精品一区二区在线播放| 日韩视频在线一区二区| 91精品国产免费| 91精品国产色综合久久| 这里只有精品视频在线观看| 欧美精品乱码久久久久久按摩| 色综合中文字幕国产 | 国产婷婷一区二区| www国产亚洲精品久久麻豆| 欧美卡1卡2卡| 欧美精品v国产精品v日韩精品| 欧美日韩不卡在线| 91精品欧美福利在线观看| 日韩精品一区二区三区视频| 亚洲精品一区在线观看| 久久久高清一区二区三区| 国产亚洲欧美在线| 最新国产成人在线观看| 亚洲午夜久久久久久久久久久| 午夜av一区二区| 蜜臀av一区二区| 粉嫩久久99精品久久久久久夜| 成人动漫一区二区三区| 99这里都是精品| 在线亚洲欧美专区二区| 欧美一级二级三级乱码| 国产精品网曝门| 偷拍一区二区三区| 国产麻豆91精品| 欧美亚洲动漫制服丝袜| 久久一区二区三区国产精品| 综合久久久久久久| 日韩极品在线观看| 成人18视频在线播放| 91精品国产综合久久福利软件| 国产精品视频一二| 美女视频免费一区| 色综合av在线| 亚洲欧美电影一区二区| 久国产精品韩国三级视频| 一本一道综合狠狠老| 国产亚洲女人久久久久毛片| 亚洲国产日韩a在线播放| 懂色av一区二区三区免费观看| 欧美喷潮久久久xxxxx| 亚洲欧美在线观看| 国产成人精品三级麻豆| 日韩美女在线视频| 日韩中文字幕亚洲一区二区va在线| 不卡在线观看av| 国产日韩欧美精品一区| 国内久久婷婷综合| 日韩亚洲欧美综合| 视频一区在线视频| 欧美日韩国产综合一区二区三区| 国产精品久久毛片| caoporn国产精品| 国产精品第一页第二页第三页 | 国产精品小仙女| 国产日韩精品一区二区三区在线| 精品一区二区影视| 国产欧美综合在线| av资源站一区| 亚洲三级小视频| 色先锋aa成人| 婷婷六月综合网| 精品日韩在线观看| 欧美精品粉嫩高潮一区二区| 国产精品嫩草影院com| 亚洲黄网站在线观看| 欧美色视频在线| 日韩影院精彩在线| 2017欧美狠狠色| 99精品桃花视频在线观看| 一区二区三区鲁丝不卡| 欧美最猛性xxxxx直播| 亚洲综合色婷婷| 日韩午夜在线影院| a在线欧美一区| 午夜精品成人在线视频| 久久蜜桃av一区精品变态类天堂 | 色综合网站在线| 六月婷婷色综合| 亚洲丝袜精品丝袜在线| 在线不卡中文字幕播放| 福利电影一区二区| 丝瓜av网站精品一区二区| 久久久精品国产免费观看同学| 欧美体内she精视频| 成人精品国产一区二区4080| 久久国产精品99久久久久久老狼|