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

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

?? os_task.c

?? uCOS-II For S3C44B0x移植源碼
?? 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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲美女淫视频| 91在线播放网址| 欧美日本精品一区二区三区| 亚洲欧洲三级电影| 成人av在线看| 国产欧美一区二区精品忘忧草 | 成人ar影院免费观看视频| 欧美在线观看一区| 亚洲激情自拍偷拍| 91福利在线导航| 亚洲综合在线第一页| 国产suv一区二区三区88区| 久久精品视频网| 成人免费看视频| 久久中文娱乐网| 国产一区二区不卡在线| 久久精品亚洲一区二区三区浴池| 经典三级在线一区| 国产亚洲一本大道中文在线| 国产成人日日夜夜| 国产精品高潮呻吟久久| 成人sese在线| 亚洲伦理在线精品| 欧美揉bbbbb揉bbbbb| 亚洲图片欧美综合| 日韩欧美成人激情| 国产+成+人+亚洲欧洲自线| 国产午夜精品久久久久久免费视| 麻豆精品一二三| 国产午夜精品久久久久久免费视| www..com久久爱| 日韩一区中文字幕| 7777精品伊人久久久大香线蕉| 麻豆久久一区二区| 国产精品免费视频一区| 欧洲亚洲国产日韩| 青青草原综合久久大伊人精品 | 欧美中文字幕久久| 日产欧产美韩系列久久99| 精品国产乱码久久久久久蜜臀| 国产大片一区二区| 一区二区三区国产豹纹内裤在线| 日韩午夜激情电影| www.99精品| 性久久久久久久久| 国产精品欧美一区喷水| 色婷婷综合中文久久一本| 丝袜美腿一区二区三区| 国产视频一区在线观看| 成人久久18免费网站麻豆 | 国产精品欧美综合在线| 亚洲精品五月天| 成人va在线观看| 国内久久精品视频| 亚洲成人tv网| 1024精品合集| 国产日韩欧美麻豆| 欧美电影免费观看高清完整版在| 欧美综合视频在线观看| 91亚洲永久精品| 国产伦精品一区二区三区免费迷| 蜜臀久久99精品久久久久宅男| 亚洲黄一区二区三区| 亚洲三级在线观看| 国产精品色一区二区三区| xf在线a精品一区二区视频网站| 欧美精品久久天天躁| 在线观看av不卡| 在线观看视频91| 91在线精品一区二区| 成人国产精品视频| 成人一级片在线观看| 国产91精品在线观看| 国产成人精品一区二区三区四区 | 欧美精品久久一区二区三区| 91女厕偷拍女厕偷拍高清| 99国内精品久久| 暴力调教一区二区三区| 成人黄色网址在线观看| 成人av网址在线观看| 成人毛片视频在线观看| 91色九色蝌蚪| 97久久精品人人做人人爽50路| av网站免费线看精品| 91蜜桃婷婷狠狠久久综合9色| 99re66热这里只有精品3直播| 色综合色综合色综合| 欧美日韩成人一区| 在线不卡中文字幕| 欧美大白屁股肥臀xxxxxx| 精品国产污网站| 欧美极品少妇xxxxⅹ高跟鞋| 国产精品少妇自拍| 亚洲欧美另类小说视频| 亚洲成人第一页| 美女视频一区二区| 丁香桃色午夜亚洲一区二区三区| www.日韩在线| 精品视频一区二区三区免费| 欧美一级搡bbbb搡bbbb| 欧美激情综合网| 亚洲免费在线视频| 免费在线观看日韩欧美| 国产成人免费网站| 色999日韩国产欧美一区二区| 欧美人妇做爰xxxⅹ性高电影| 在线不卡a资源高清| 久久久亚洲精华液精华液精华液| 国产精品污www在线观看| 亚洲综合一区二区三区| 男女视频一区二区| 成人国产精品免费网站| 欧美精品久久一区| 国产午夜久久久久| 午夜精品福利一区二区三区av| 精品系列免费在线观看| 一本在线高清不卡dvd| 日韩免费一区二区| 亚洲人成在线播放网站岛国| 性欧美大战久久久久久久久| 高清不卡一区二区在线| 欧美亚洲综合在线| 久久久亚洲精华液精华液精华液| 一区二区三区欧美视频| 国产资源在线一区| 色吊一区二区三区| 久久久久久久久久久电影| 亚洲伊人色欲综合网| 国产.欧美.日韩| 日韩三级视频在线观看| 一区二区三区四区在线| 国产美女主播视频一区| 欧美人伦禁忌dvd放荡欲情| 国产精品久久影院| 久久成人羞羞网站| 欧美精品久久一区| 一区2区3区在线看| 成人性视频网站| 欧美成人在线直播| 午夜视频在线观看一区二区三区| 成人性生交大片免费看中文| 日韩欧美成人一区二区| 五月天网站亚洲| 91视频一区二区三区| 国产三级精品三级| 久久狠狠亚洲综合| 欧美日韩成人一区| 亚洲一区在线观看网站| av影院午夜一区| 中文子幕无线码一区tr| 国产在线麻豆精品观看| 91.com视频| 午夜亚洲福利老司机| 在线免费亚洲电影| 日韩码欧中文字| 成人av小说网| 国产精品初高中害羞小美女文| 国产毛片精品一区| 欧美不卡一二三| 日韩电影一区二区三区| 欧美日韩精品一区视频| 亚洲一区二区五区| 99国产精品久久久久| 国产精品人妖ts系列视频| 国产成人在线视频播放| 久久久亚洲精品一区二区三区| 狠狠色丁香婷婷综合久久片| 欧美不卡一区二区三区四区| 精彩视频一区二区三区| 久久美女艺术照精彩视频福利播放 | 国产清纯白嫩初高生在线观看91| 蜜桃精品在线观看| 亚洲精品一区二区在线观看| 极品少妇xxxx精品少妇偷拍| 日韩女优av电影| 国产一区二区三区在线观看免费视频 | 亚洲一区二区三区爽爽爽爽爽| 日本道免费精品一区二区三区| 亚洲线精品一区二区三区| 欧美人伦禁忌dvd放荡欲情| 日本亚洲视频在线| 欧美成人精品1314www| 国产九色sp调教91| 国产精品伦一区二区三级视频| 91视视频在线直接观看在线看网页在线看 | 在线精品视频免费观看| 亚洲v中文字幕| 日韩精品一区二| 成人免费视频播放| 一区二区三区不卡视频在线观看| 3d成人h动漫网站入口| 精品一区二区三区在线播放| 欧美国产日韩亚洲一区| 一本到不卡精品视频在线观看| 亚洲国产精品一区二区久久恐怖片 | 午夜久久电影网| 久久欧美中文字幕| 在线一区二区三区四区五区 | 一区二区在线看| 日韩亚洲欧美中文三级|