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

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

?? os_task.c

?? uCOS-II For S3C44B0x移植源碼
?? C
?? 第 1 頁 / 共 3 頁
字號(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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色精品在线视频| 国产日产精品1区| 久久久久久久久久美女| 亚洲日本一区二区三区| 久久电影网站中文字幕| 在线观看日韩av先锋影音电影院| 欧美一级免费大片| 亚洲欧美另类综合偷拍| 国产69精品久久久久777| 在线播放中文一区| 一区二区欧美视频| 9色porny自拍视频一区二区| 欧美一区二区三区免费在线看| 亚洲乱码中文字幕综合| 国产精品一级在线| 欧美大白屁股肥臀xxxxxx| 亚洲高清在线视频| 91成人免费电影| 亚洲日本一区二区三区| 成人黄色网址在线观看| 国产日韩欧美制服另类| 精品一区二区三区免费视频| 3751色影院一区二区三区| 亚洲资源在线观看| 一本色道久久加勒比精品| 国产精品久久国产精麻豆99网站| 久久精品噜噜噜成人av农村| 欧美一级久久久久久久大片| 婷婷综合另类小说色区| 欧美色图激情小说| 亚洲第一福利视频在线| 欧美日韩久久一区| 天堂一区二区在线| 欧美精品三级在线观看| 日韩精品乱码av一区二区| 欧美男生操女生| 日本aⅴ精品一区二区三区| 91精品国产综合久久久久久漫画 | 国产成人激情av| 久久婷婷一区二区三区| 国产一区欧美一区| 国产日产亚洲精品系列| 成人激情电影免费在线观看| 亚洲三级小视频| 欧美视频在线不卡| 日韩电影在线一区二区| 欧美精品一区二区在线观看| 国产九色sp调教91| 亚洲情趣在线观看| 在线观看视频一区二区| 日韩成人精品在线| 精品国产乱码久久久久久1区2区 | 亚洲一区二区三区视频在线| 在线观看区一区二| 日韩经典中文字幕一区| 欧美成人艳星乳罩| 99re这里只有精品6| 亚洲国产日韩一级| 日韩午夜精品视频| 成人一级视频在线观看| 一区二区三区欧美激情| 日韩三级伦理片妻子的秘密按摩| 国产精品18久久久| 亚洲午夜精品网| 久久久精品中文字幕麻豆发布| 99久免费精品视频在线观看| 日欧美一区二区| 中文字幕精品一区| 91精品国产综合久久精品app | 欧美一区欧美二区| 国产成人精品网址| 婷婷综合在线观看| 国产精品网站导航| 欧美一区二区三级| 96av麻豆蜜桃一区二区| 日本不卡免费在线视频| 中文字幕第一区综合| 精品视频一区三区九区| 久久99久久久欧美国产| 亚洲视频在线观看三级| 精品国产乱码久久| 欧美日韩高清在线播放| eeuss影院一区二区三区| 免费精品视频在线| 亚洲永久精品大片| 国产精品网站一区| 精品国产三级a在线观看| 欧美最猛黑人xxxxx猛交| 成人网在线播放| 久久福利资源站| 亚洲国产精品久久久久婷婷884| 欧美激情一二三区| 久久众筹精品私拍模特| 91精品国产综合久久精品性色| 91看片淫黄大片一级在线观看| 国产麻豆精品视频| 麻豆成人91精品二区三区| 性欧美大战久久久久久久久| 亚洲精品成人精品456| 国产精品网友自拍| 国产亚洲一区二区三区在线观看 | 免费成人结看片| 亚洲国产精品一区二区尤物区| 综合久久给合久久狠狠狠97色| 久久久国产一区二区三区四区小说| 8x8x8国产精品| 欧美色国产精品| 91猫先生在线| 91丝袜高跟美女视频| 成人精品国产一区二区4080| 国产一区二区三区高清播放| 经典一区二区三区| 九色porny丨国产精品| 麻豆精品国产传媒mv男同| 免费成人性网站| 韩国女主播成人在线观看| 免费成人美女在线观看.| 麻豆视频观看网址久久| 蜜臂av日日欢夜夜爽一区| 免费成人在线播放| 久久av老司机精品网站导航| 国内精品在线播放| 国产精品一区二区免费不卡| 国产成人午夜精品5599| 不卡的av网站| 日本丰满少妇一区二区三区| 欧美综合一区二区三区| 欧美日韩亚洲另类| 日韩一级二级三级| 久久久三级国产网站| 中文天堂在线一区| 亚洲一区二区三区四区在线免费观看 | 激情欧美一区二区三区在线观看| 免费观看在线色综合| 国产乱淫av一区二区三区| 国产传媒一区在线| 成人高清av在线| 91官网在线观看| 欧美一区二区精美| 久久精品亚洲一区二区三区浴池 | 奇米影视7777精品一区二区| 九九国产精品视频| 成人自拍视频在线观看| 色94色欧美sute亚洲线路二| 91精品欧美综合在线观看最新| 久久综合久色欧美综合狠狠| 国产精品久久久一区麻豆最新章节| 亚洲乱码中文字幕综合| 麻豆一区二区三| 色屁屁一区二区| 欧美成人激情免费网| 最新日韩av在线| 日韩精品一级中文字幕精品视频免费观看| 久久精品久久综合| 色综合亚洲欧洲| 精品日韩99亚洲| 亚洲激情五月婷婷| 激情图片小说一区| 欧美伊人精品成人久久综合97| 欧美tickling网站挠脚心| 1024国产精品| 国产在线日韩欧美| 欧美视频一区在线| 亚洲国产高清aⅴ视频| 日韩国产高清影视| 成人国产精品免费网站| 欧美一级片免费看| 一区二区三区精密机械公司| 国产伦精一区二区三区| 欧美另类videos死尸| 成人免费在线视频| 国产成人免费视频网站 | 91久久国产综合久久| 久久久久久久久岛国免费| 亚洲国产视频一区| 99精品视频免费在线观看| 日韩精品在线一区二区| 一区二区三区av电影| 成人av电影在线播放| 久久欧美中文字幕| 美国欧美日韩国产在线播放 | 国产精品中文字幕欧美| 3d动漫精品啪啪| 亚洲电影激情视频网站| 91网站最新地址| 国产精品电影院| 成人av在线看| 国产精品美女视频| 国产精品主播直播| 久久蜜桃一区二区| 精品一区二区三区视频在线观看 | 欧美在线视频你懂得| 亚洲视频一二三| 成人动漫视频在线| 国产精品视频线看| 国产精品一区二区三区四区| 欧美xxxx老人做受| 国产自产高清不卡| 精品粉嫩aⅴ一区二区三区四区| 日韩av一级电影|