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

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

?? os_task.c

?? 本文介紹了_C/OS-II概況和ARM體系結構中與移植工作相關的一些概念
?? 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一区二区三区免费野_久草精品视频
欧美午夜精品一区二区三区| 美女在线视频一区| 欧美高清性hdvideosex| 国产精品亚洲专一区二区三区 | 在线一区二区三区做爰视频网站| 久久国产精品99久久久久久老狼| 一区二区三区蜜桃网| 日本一区二区高清| 日韩免费观看高清完整版在线观看| 色呦呦网站一区| 国产精品一区免费视频| 日韩不卡在线观看日韩不卡视频| 亚洲欧美日韩国产成人精品影院| 久久日韩精品一区二区五区| 欧美精品在线视频| 91麻豆swag| bt7086福利一区国产| 激情欧美一区二区| 奇米色777欧美一区二区| 亚洲综合清纯丝袜自拍| 成人欧美一区二区三区1314| 久久久久99精品国产片| 亚洲精品在线观看网站| 日韩一级免费一区| 欧美精品免费视频| 精品视频资源站| 欧美性大战xxxxx久久久| 国产日韩亚洲欧美综合| 欧美电影免费提供在线观看| 在线播放国产精品二区一二区四区| 一本大道久久精品懂色aⅴ| 丰满白嫩尤物一区二区| 国产精品系列在线观看| 国产另类ts人妖一区二区| 极品美女销魂一区二区三区| 久久国产夜色精品鲁鲁99| 美女性感视频久久| 美女视频黄a大片欧美| 视频一区欧美日韩| 免费观看在线色综合| 欧美国产欧美综合| 欧美精品一区二区三区四区| 色婷婷亚洲婷婷| 国产成人av网站| 天天综合网 天天综合色| 久久精品人人做人人爽人人| 欧美一区二区网站| 色综合色综合色综合色综合色综合| 久久精品国产99国产| 一区二区三区av电影| 国产精品美女一区二区在线观看| 日韩丝袜美女视频| 69精品人人人人| 91久久精品午夜一区二区| 风间由美一区二区三区在线观看| 亚洲黄色录像片| 国产精品视频线看| 欧美精品一区二区久久婷婷 | 日韩欧美激情一区| 99亚偷拍自图区亚洲| 亚洲色大成网站www久久九九| 亚洲男人电影天堂| av中文字幕在线不卡| 高清国产一区二区三区| 麻豆国产精品视频| 国产成人精品三级麻豆| 色悠悠亚洲一区二区| 这里只有精品电影| 久久久蜜臀国产一区二区| 亚洲图片欧美激情| 亚洲一区二区精品久久av| 久久99久久精品| 成人午夜电影小说| 国产欧美精品一区aⅴ影院| 91麻豆精品国产无毒不卡在线观看| 欧美日韩免费在线视频| 欧美日韩三级视频| 91精品国产色综合久久不卡电影 | 国产欧美一区二区精品性| 欧美图片一区二区三区| 欧美亚洲动漫精品| 精品乱人伦小说| 国产一区二区导航在线播放| 日本sm残虐另类| 日韩欧美国产一区在线观看| 精品一区二区精品| 成人欧美一区二区三区白人| 91久久精品国产91性色tv| 亚洲第一综合色| 日韩欧美久久一区| 91麻豆国产自产在线观看| 午夜精品久久久久久久久久久| 日韩午夜激情免费电影| 精品在线观看免费| 欧美在线视频你懂得| 亚洲色图第一区| av一二三不卡影片| 亚洲免费视频中文字幕| 91在线小视频| 亚洲妇女屁股眼交7| 欧美日韩专区在线| 秋霞电影一区二区| 精品久久久久一区| 成人激情校园春色| 一区二区三区在线播放| 欧美一区二区三区成人| 久久99精品久久久久久| 国产亚洲精品资源在线26u| 成人免费观看视频| 亚洲国产成人va在线观看天堂| 欧美色图天堂网| 看电视剧不卡顿的网站| 国产精品色婷婷| 欧美日韩一区高清| 成人动漫一区二区在线| 一区在线观看免费| 久久久久亚洲综合| 337p亚洲精品色噜噜狠狠| 成人av在线观| 99精品视频在线观看| 91精品国产综合久久久久久久久久 | 久久99精品国产.久久久久| 亚洲国产日韩一区二区| 国产精品免费看片| 最新成人av在线| 亚洲人成网站色在线观看| 综合久久一区二区三区| 亚洲欧美一区二区在线观看| 国产精品久久久久久久久晋中| 精品国产制服丝袜高跟| 国产亚洲一区二区三区在线观看| 精品国产91九色蝌蚪| 久久蜜臀精品av| 成人欧美一区二区三区视频网页 | 青青草国产成人99久久| 三级一区在线视频先锋 | 亚洲成av人片一区二区梦乃| 亚洲综合视频在线观看| 蜜桃精品视频在线观看| 国产美女娇喘av呻吟久久| 成人动漫一区二区在线| 欧美在线影院一区二区| 欧美剧情电影在线观看完整版免费励志电影| 精品免费视频.| 久久精品一区二区三区不卡 | 国产电影一区在线| 亚洲丝袜另类动漫二区| 欧美一区二区三区免费在线看| 欧美日韩二区三区| 国产一区 二区| 亚洲成人高清在线| 日韩成人av影视| 亚洲一区在线观看免费观看电影高清| 激情综合一区二区三区| 精品国产乱码久久久久久蜜臀 | 亚洲精品成人在线| 欧美日韩一级二级三级| 日韩精品电影在线| 久久人人爽爽爽人久久久| 成人在线视频一区| 亚洲精品第一国产综合野| 欧美日韩电影在线| 久久成人久久爱| 国产偷国产偷亚洲高清人白洁 | 777xxx欧美| 日韩成人免费看| 久久蜜臀精品av| 99久久久久久| 日韩和欧美一区二区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 国产精品天天看| 欧美自拍丝袜亚洲| 美国欧美日韩国产在线播放| 欧美激情在线一区二区三区| 91老司机福利 在线| 一区二区三区四区不卡视频| 亚洲精品中文在线影院| 高清国产午夜精品久久久久久| 国产精品99久久久久久久女警| 久久精品国产精品亚洲红杏| 九九在线精品视频| 韩国欧美国产一区| 99久久99久久精品免费观看| 99久久精品免费看| 欧美影院精品一区| 日韩精品一区二区三区视频播放| 欧美成人国产一区二区| 欧美激情艳妇裸体舞| 亚洲精品第1页| 成人精品视频一区二区三区 | 在线观看区一区二| 国产乱对白刺激视频不卡| 亚洲一卡二卡三卡四卡五卡| 国产亚洲精品7777| 宅男在线国产精品| 日本道精品一区二区三区| 国内精品在线播放| 亚洲成人高清在线| 日韩理论片网站| 久久久久久久电影|