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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? os_task.c

?? 用于使用S3C44B0x開(kāi)發(fā)的人員移植uCOS-
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(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.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久69国产一区二区蜜臀| 国产精品白丝jk黑袜喷水| 欧美在线综合视频| 日韩伦理电影网| av在线一区二区| 国产精品视频yy9299一区| 国产精品自产自拍| 精品精品欲导航| 蜜臀久久99精品久久久久久9| 欧美日韩精品一区视频| 亚洲综合一二三区| 在线免费亚洲电影| 亚洲一区二区3| 色88888久久久久久影院野外| 中文字幕亚洲成人| 99精品视频在线播放观看| 国产精品女同一区二区三区| 风流少妇一区二区| 国产精品三级在线观看| av一区二区久久| 亚洲精品第1页| 欧美在线免费播放| 亚洲成人一区二区在线观看| 欧美日韩精品欧美日韩精品| 亚洲大片免费看| 91精品国产综合久久精品app | 一区二区三区四区乱视频| 99久久er热在这里只有精品15 | 中文字幕免费在线观看视频一区| 国产99精品国产| 中文字幕一区二区不卡 | 国产精品系列在线观看| 国产欧美日韩麻豆91| av资源站一区| 亚洲一线二线三线视频| 欧美老肥妇做.爰bbww| 免费成人在线观看视频| 久久女同性恋中文字幕| 成人av在线播放网址| 一区二区三区精品| 5858s免费视频成人| 狠狠色狠狠色综合日日91app| 欧美精品一区二区久久久| 国产精品资源在线观看| 国产精品国产三级国产普通话99| 色94色欧美sute亚洲线路一ni| 五月婷婷久久丁香| 欧美sm极限捆绑bd| www.综合网.com| 亚洲国产视频一区二区| 欧美精品精品一区| 国产一区日韩二区欧美三区| 亚洲视频一二三区| 欧美疯狂做受xxxx富婆| 国产精品一区二区无线| 亚洲欧洲99久久| 在线电影院国产精品| 国内一区二区在线| 亚洲欧美日韩电影| 欧美一区二区在线免费观看| 国产精品一卡二卡在线观看| 亚洲女女做受ⅹxx高潮| 3atv一区二区三区| 成av人片一区二区| 免费观看在线色综合| 国产欧美视频一区二区| 欧美午夜一区二区三区| 国产毛片精品一区| 亚洲免费在线视频一区 二区| 91精品国产综合久久香蕉麻豆| 国产成人免费在线视频| 亚洲一区二区偷拍精品| 久久先锋影音av鲁色资源| 色哟哟一区二区| 美国三级日本三级久久99| 国产精品短视频| 欧美不卡激情三级在线观看| 91在线观看视频| 毛片基地黄久久久久久天堂| 亚洲视频每日更新| 亚洲精品一区二区精华| 日本道在线观看一区二区| 国产一区二区毛片| 亚洲永久精品国产| 国产欧美一区二区精品秋霞影院| 欧美日韩在线播放三区四区| 国产黄色91视频| 免费三级欧美电影| 亚洲精品国产无套在线观| 久久久久久综合| 欧美在线视频全部完| www.av精品| 久久99精品久久久久久久久久久久| 亚洲色图欧美激情| 久久网这里都是精品| 欧美军同video69gay| 色综合久久久久综合体桃花网| 久久 天天综合| 日韩电影免费一区| 亚洲综合色在线| 国产精品乱码妇女bbbb| 精品国产在天天线2019| 制服丝袜亚洲播放| 91国偷自产一区二区使用方法| 国产精品一级二级三级| 久久精品国产在热久久| 亚洲成av人影院| 亚洲欧美日韩国产另类专区| 欧美激情综合网| 久久久综合精品| 欧美一区二区三区白人| 在线看国产一区| 99精品视频一区二区三区| 国产乱码精品一区二区三区av| 美腿丝袜一区二区三区| 午夜国产精品影院在线观看| 一区二区三区不卡在线观看| 亚洲欧洲成人精品av97| 国产精品女上位| 国产婷婷色一区二区三区| 日韩精品在线网站| 欧美人与禽zozo性伦| 欧美三级午夜理伦三级中视频| av资源网一区| 白白色亚洲国产精品| 成人白浆超碰人人人人| 风间由美一区二区av101 | 国产美女视频91| 国内成+人亚洲+欧美+综合在线| 日本在线不卡视频| 午夜精品一区二区三区免费视频| 伊人一区二区三区| 亚洲天堂av老司机| 亚洲欧美区自拍先锋| 国产精品成人免费| 国产精品卡一卡二卡三| 亚洲国产精品av| 久久精品欧美一区二区三区麻豆| 久久久亚洲高清| 久久综合色鬼综合色| 久久久久亚洲综合| 国产欧美日韩在线| 中文在线免费一区三区高中清不卡| 久久久电影一区二区三区| 国产亚洲一区字幕| 国产精品国产三级国产专播品爱网| 国产精品家庭影院| 一区二区三区中文字幕精品精品| 亚洲精品成人在线| 亚洲夂夂婷婷色拍ww47| 五月婷婷激情综合网| 免费观看成人av| 国产自产v一区二区三区c| 国产精品一区二区在线观看网站| 成人夜色视频网站在线观看| 成人h动漫精品一区二| 色综合久久久久综合体| 欧美三级视频在线播放| 欧美一级高清片| 久久久久久久av麻豆果冻| 国产精品萝li| 亚洲在线观看免费| 麻豆91精品视频| 国产风韵犹存在线视精品| 91网站最新网址| 欧美日韩国产综合一区二区 | 欧美午夜片在线看| 日韩欧美中文一区| 国产婷婷色一区二区三区| 最新热久久免费视频| 亚洲国产综合色| 日本91福利区| 国产成人丝袜美腿| 91免费视频观看| 在线播放视频一区| 久久综合九色综合欧美亚洲| 国产精品乱码人人做人人爱| 亚洲一区二区三区四区的| 久久黄色级2电影| 成人av网址在线| 欧美日韩三级一区二区| 精品国产伦一区二区三区观看体验| 亚洲国产精品激情在线观看| 亚洲伊人伊色伊影伊综合网| 精品在线播放免费| 91色九色蝌蚪| 日韩视频免费观看高清完整版在线观看| 99视频在线精品| 欧美一级精品在线| 国产精品久久三| 午夜精品久久久久久久99水蜜桃| 国产一区二区在线视频| 色综合久久99| 精品99一区二区| 亚洲综合视频在线观看| 国产一区二区三区最好精华液| 色综合激情久久| 欧美电视剧在线观看完整版| 亚洲精品日日夜夜| 国产资源精品在线观看|