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

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

?? os_task.c

?? 一共40M 不能貼在論壇中。絕對好東西。要得話留下email
?? C
?? 第 1 頁 / 共 3 頁
字號:
#endif
    if (prio == OS_PRIO_SELF) {                                 /* See if a task is requesting to ...  */
        OS_ENTER_CRITICAL();                                    /* ... this task to delete itself      */
        stat = OSTCBCur->OSTCBDelReq;                           /* Return request status to caller     */
        OS_EXIT_CRITICAL();
        return (stat);
    }
    OS_ENTER_CRITICAL();
    if ((ptcb = OSTCBPrioTbl[prio]) != (OS_TCB *)0) {           /* Task to delete must exist           */
        ptcb->OSTCBDelReq = OS_TASK_DEL_REQ;                    /* Set flag indicating task to be DEL. */
        err               = OS_NO_ERR;
    } else {
        err               = OS_TASK_NOT_EXIST;                  /* Task must be deleted                */
    }
    OS_EXIT_CRITICAL();
    return (err);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                        RESUME A SUSPENDED TASK
*
* Description: This function is called to resume a previously suspended task.  This is the only call that
*              will remove an explicit task suspension.
*
* Arguments  : prio     is the priority of the task to resume.
*
* Returns    : OS_NO_ERR                if the requested task is resumed
*              OS_PRIO_INVALID          if the priority you specify is higher that the maximum allowed
*                                       (i.e. >= OS_LOWEST_PRIO)
*              OS_TASK_RESUME_PRIO      if the task to resume does not exist
*              OS_TASK_NOT_SUSPENDED    if the task to resume has not been suspended
*********************************************************************************************************
*/

#if OS_TASK_SUSPEND_EN > 0
INT8U  OSTaskResume (INT8U prio) reentrant
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif
    OS_TCB    *ptcb;


#if OS_ARG_CHK_EN > 0
    if (prio >= OS_LOWEST_PRIO) {                               /* Make sure task priority is valid    */
        return (OS_PRIO_INVALID);
    }
#endif
    OS_ENTER_CRITICAL();
    if ((ptcb = OSTCBPrioTbl[prio]) == (OS_TCB *)0) {           /* Task to suspend must exist          */
        OS_EXIT_CRITICAL();
        return (OS_TASK_RESUME_PRIO);
    }
    if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) != 0x00) {                     /* Task must be suspended   */
        if (((ptcb->OSTCBStat &= ~OS_STAT_SUSPEND) == OS_STAT_RDY) &&      /* Remove suspension        */
             (ptcb->OSTCBDly  == 0)) {                                     /* Must not be delayed      */
            OSRdyGrp               |= ptcb->OSTCBBitY;                     /* Make task ready to run   */
            OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
            OS_EXIT_CRITICAL();
            OS_Sched();
        } else {
            OS_EXIT_CRITICAL();
        }
        return (OS_NO_ERR);
    }
    OS_EXIT_CRITICAL();
    return (OS_TASK_NOT_SUSPENDED);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                             STACK CHECKING
*
* Description: This function is called to check the amount of free memory left on the specified task's
*              stack.
*
* Arguments  : prio     is the task priority
*
*              ppdata    is a pointer to a data structure of type OS_STK_DATA.
*
* Returns    : OS_NO_ERR           upon success
*              OS_PRIO_INVALID     if the priority you specify is higher that the maximum allowed
*                                  (i.e. > OS_LOWEST_PRIO) or, you have not specified OS_PRIO_SELF.
*              OS_TASK_NOT_EXIST   if the desired task has not been created
*              OS_TASK_OPT_ERR     if you did NOT specified OS_TASK_OPT_STK_CHK when the task was created
*********************************************************************************************************
*/
#if OS_TASK_CREATE_EXT_EN > 0
INT8U  OSTaskStkChk (INT8U prio, OS_STK_DATA *ppdata) reentrant
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif
    OS_TCB    *ptcb;
    OS_STK    *pchk;
    INT32U     free;
    INT32U     size;


#if OS_ARG_CHK_EN > 0
    if (prio > OS_LOWEST_PRIO && prio != OS_PRIO_SELF) {        /* Make sure task priority is valid    */
        return (OS_PRIO_INVALID);
    }
#endif
    ppdata->OSFree = 0;                                          /* Assume failure, set to 0 size       */
    ppdata->OSUsed = 0;
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                        /* See if check for SELF                        */
        prio = OSTCBCur->OSTCBPrio;
    }
    ptcb = OSTCBPrioTbl[prio];
    if (ptcb == (OS_TCB *)0) {                         /* Make sure task exist                         */
        OS_EXIT_CRITICAL();
        return (OS_TASK_NOT_EXIST);
    }
    if ((ptcb->OSTCBOpt & OS_TASK_OPT_STK_CHK) == 0) { /* Make sure stack checking option is set       */
        OS_EXIT_CRITICAL();
        return (OS_TASK_OPT_ERR);
    }
    free = 0;
    size = ptcb->OSTCBStkSize;
    pchk = ptcb->OSTCBStkBottom;
    OS_EXIT_CRITICAL();
#if OS_STK_GROWTH == 1
    while (*pchk++ == (OS_STK)0) {                    /* Compute the number of zero entries on the stk */
        free++;
    }
#else
    while (*pchk-- == (OS_STK)0) {
        free++;
    }
#endif
    ppdata->OSFree = free * sizeof(OS_STK);            /* Compute number of free bytes on the stack     */
    ppdata->OSUsed = (size - free) * sizeof(OS_STK);   /* Compute number of bytes used on the stack     */
    return (OS_NO_ERR);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                            SUSPEND A TASK
*
* Description: This function is called to suspend a task.  The task can be the calling task if the
*              priority passed to OSTaskSuspend() is the priority of the calling task or OS_PRIO_SELF.
*
* Arguments  : prio     is the priority of the task to suspend.  If you specify OS_PRIO_SELF, the
*                       calling task will suspend itself and rescheduling will occur.
*
* Returns    : OS_NO_ERR                if the requested task is suspended
*              OS_TASK_SUSPEND_IDLE     if you attempted to suspend the idle task which is not allowed.
*              OS_PRIO_INVALID          if the priority you specify is higher that the maximum allowed
*                                       (i.e. >= OS_LOWEST_PRIO) or, you have not specified OS_PRIO_SELF.
*              OS_TASK_SUSPEND_PRIO     if the task to suspend does not exist
*
* Note       : You should use this function with great care.  If you suspend a task that is waiting for
*              an event (i.e. a message, a semaphore, a queue ...) you will prevent this task from
*              running when the event arrives.
*********************************************************************************************************
*/

#if OS_TASK_SUSPEND_EN > 0
INT8U  OSTaskSuspend (INT8U prio) reentrant
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif
    BOOLEAN    self;
    OS_TCB    *ptcb;


#if OS_ARG_CHK_EN > 0
    if (prio == OS_IDLE_PRIO) {                                 /* Not allowed to suspend idle task    */
        return (OS_TASK_SUSPEND_IDLE);
    }
    if (prio >= OS_LOWEST_PRIO && prio != OS_PRIO_SELF) {       /* Task priority valid ?               */
        return (OS_PRIO_INVALID);
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                                 /* See if suspend SELF                 */
        prio = OSTCBCur->OSTCBPrio;
        self = TRUE;
    } else if (prio == OSTCBCur->OSTCBPrio) {                   /* See if suspending self              */
        self = TRUE;
    } else {
        self = FALSE;                                           /* No suspending another task          */
    }
    if ((ptcb = OSTCBPrioTbl[prio]) == (OS_TCB *)0) {           /* Task to suspend must exist          */
        OS_EXIT_CRITICAL();
        return (OS_TASK_SUSPEND_PRIO);
    }
    if ((OSRdyTbl[ptcb->OSTCBY] &= ~ptcb->OSTCBBitX) == 0x00) { /* Make task not ready                 */
        OSRdyGrp &= ~ptcb->OSTCBBitY;
    }
    ptcb->OSTCBStat |= OS_STAT_SUSPEND;                         /* Status of task is 'SUSPENDED'       */
    OS_EXIT_CRITICAL();
    if (self == TRUE) {                                         /* Context switch only if SELF         */
        OS_Sched();
    }
    return (OS_NO_ERR);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                            QUERY A TASK
*
* Description: This function is called to obtain a copy of the desired task's TCB.
*
* Arguments  : prio     is the priority of the task to obtain information from.
*
* Returns    : OS_NO_ERR       if the requested task is suspended
*              OS_PRIO_INVALID if the priority you specify is higher that the maximum allowed
*                              (i.e. > OS_LOWEST_PRIO) or, you have not specified OS_PRIO_SELF.
*              OS_PRIO_ERR     if the desired task has not been created
*********************************************************************************************************
*/

#if OS_TASK_QUERY_EN > 0
INT8U  OSTaskQuery (INT8U prio, OS_TCB *ppdata) reentrant
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif
    OS_TCB    *ptcb;


#if OS_ARG_CHK_EN > 0
    if (prio > OS_LOWEST_PRIO && prio != OS_PRIO_SELF) {   /* Task priority valid ?                    */
        return (OS_PRIO_INVALID);
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                            /* See if suspend SELF                      */
        prio = OSTCBCur->OSTCBPrio;
    }
    if ((ptcb = OSTCBPrioTbl[prio]) == (OS_TCB *)0) {      /* Task to query must exist                 */
        OS_EXIT_CRITICAL();
        return (OS_PRIO_ERR);
    }
    memcpy(ppdata, ptcb, sizeof(OS_TCB));                  /* Copy TCB into user storage area          */
    OS_EXIT_CRITICAL();
    return (OS_NO_ERR);
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产在热久久| 在线综合亚洲欧美在线视频| 欧美高清一级片在线| 久久先锋影音av鲁色资源网| 亚洲国产日韩精品| 成人免费视频网站在线观看| 日韩欧美区一区二| 丝袜美腿亚洲一区| 91麻豆蜜桃一区二区三区| 2021中文字幕一区亚洲| 日本视频一区二区| 欧美色爱综合网| 综合网在线视频| 成a人片亚洲日本久久| 久久奇米777| 狂野欧美性猛交blacked| 欧美日韩国产另类一区| 亚洲激情中文1区| 欧美视频中文一区二区三区在线观看| 26uuu色噜噜精品一区| 日本中文字幕一区二区视频| 欧美性做爰猛烈叫床潮| 伊人色综合久久天天人手人婷| 国产**成人网毛片九色| 久久久久久久久岛国免费| 久久机这里只有精品| 日韩欧美区一区二| 精品在线免费观看| 精品成人私密视频| 国产一区二区三区不卡在线观看 | 亚洲高清视频的网址| 91视频你懂的| 一区二区三区不卡在线观看| 一本色道亚洲精品aⅴ| 亚洲综合色婷婷| 欧美三级韩国三级日本三斤| 亚洲成人午夜影院| 6080亚洲精品一区二区| 久久精品国产免费看久久精品| 日韩欧美亚洲一区二区| 国产乱人伦偷精品视频不卡| 国产精品美女久久久久久久久久久 | 丝袜亚洲另类欧美综合| 91精品一区二区三区久久久久久| 日韩国产精品久久久久久亚洲| 717成人午夜免费福利电影| 免费在线视频一区| 国产无遮挡一区二区三区毛片日本 | 在线电影院国产精品| 日本va欧美va欧美va精品| 久久久久久一级片| 北条麻妃一区二区三区| 亚洲精品国产一区二区精华液| 色综合天天天天做夜夜夜夜做| 亚洲在线观看免费视频| 91精品国产综合久久精品麻豆| 久久精品国产一区二区三区免费看 | 亚洲美女视频在线| 日韩一区二区精品在线观看| 国产电影精品久久禁18| 亚洲午夜国产一区99re久久| 日韩欧美在线1卡| 成人美女在线观看| 日本中文一区二区三区| 日韩一区在线看| 日韩欧美亚洲一区二区| 一本到高清视频免费精品| 美女www一区二区| 亚洲精品五月天| 久久综合久久鬼色中文字| 欧美视频一二三区| 从欧美一区二区三区| 天天av天天翘天天综合网色鬼国产| 久久嫩草精品久久久精品| 欧美午夜精品免费| 懂色av一区二区在线播放| 午夜精品福利一区二区三区av | 色久优优欧美色久优优| 久久99国产乱子伦精品免费| 又紧又大又爽精品一区二区| wwwwww.欧美系列| 欧美疯狂性受xxxxx喷水图片| 成人精品视频一区二区三区尤物| 日韩电影在线免费观看| 亚洲一区二区五区| 国产精品不卡一区| 欧美国产日本韩| 日韩欧美国产一区二区在线播放 | 99国产精品一区| 国产精品91xxx| 久久99精品国产.久久久久久| 亚洲午夜久久久久久久久久久| 国产日韩精品视频一区| 精品剧情在线观看| 欧美男同性恋视频网站| 色婷婷综合久久久久中文| 成人性生交大片免费看视频在线| 精品一二三四在线| 免费欧美在线视频| 免费久久99精品国产| 五月婷婷综合激情| 亚洲二区在线观看| 亚洲欧美激情小说另类| 亚洲欧美另类久久久精品2019| 亚洲综合激情网| 亚洲女女做受ⅹxx高潮| 亚洲色图都市小说| 综合色天天鬼久久鬼色| 最新热久久免费视频| 亚洲视频一区二区在线| 亚洲三级小视频| 亚洲精品欧美二区三区中文字幕| 国产精品美女久久久久久久| 国产精品免费久久久久| 国产精品久久久久国产精品日日| 中文在线免费一区三区高中清不卡| 久久久久久久久久久99999| 久久精品一区二区三区不卡牛牛 | 欧美一区二区国产| 欧美成人猛片aaaaaaa| 欧美精品一区二区久久久| 精品日韩一区二区三区| 国产亚洲一二三区| 中文字幕日韩一区| 亚洲成人av在线电影| 美女网站一区二区| 国产尤物一区二区在线| 成人精品视频一区二区三区尤物| 91香蕉国产在线观看软件| 在线免费观看视频一区| 欧美一级夜夜爽| 久久久精品综合| 亚洲人成在线播放网站岛国| 亚洲激情欧美激情| 麻豆一区二区三| 国产麻豆精品在线| 色狠狠av一区二区三区| 欧美一区二区三区免费大片| 国产欧美一区二区在线| 亚洲精品亚洲人成人网| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产福利91精品一区| 欧洲一区二区三区免费视频| 51精品国自产在线| 国产日韩精品一区二区浪潮av| 亚洲精选视频免费看| 狠狠色综合日日| 91成人在线精品| 欧美大片在线观看一区| 日韩毛片在线免费观看| 热久久久久久久| 成人av电影在线| 欧美一区二区三区婷婷月色| 国产精品嫩草久久久久| 日本不卡一区二区三区| 99麻豆久久久国产精品免费| 91精品在线免费| 亚洲欧美一区二区三区国产精品| 久久99国产精品免费网站| 欧洲国内综合视频| 欧美经典三级视频一区二区三区| 亚洲成人av免费| 99精品欧美一区二区三区综合在线| 91麻豆精品国产| 亚洲综合图片区| fc2成人免费人成在线观看播放| 91精品国产麻豆国产自产在线| 自拍av一区二区三区| 国产很黄免费观看久久| 日韩欧美激情四射| 婷婷亚洲久悠悠色悠在线播放| 成人av动漫网站| 国产午夜精品久久久久久久| 日本麻豆一区二区三区视频| 欧美性一级生活| 亚洲视频一二区| 成人va在线观看| 精品不卡在线视频| 日本sm残虐另类| 欧美麻豆精品久久久久久| 亚洲人一二三区| 99久久精品国产麻豆演员表| 中文字幕一区二区三区不卡在线| 蜜臀久久久99精品久久久久久| 色婷婷激情久久| 亚洲女同一区二区| 91免费看片在线观看| 国产精品进线69影院| 国产精品77777| 国产色爱av资源综合区| 国产精品一区二区三区网站| 精品三级在线观看| 激情综合色丁香一区二区| 制服丝袜一区二区三区| 日韩电影免费在线观看网站| 欧美久久久久久久久| 日本成人在线不卡视频| 日韩三级精品电影久久久| 免费高清成人在线| 欧美r级在线观看|