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

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

?? ucos ii v2.9 ?

?? uCOSII_V2.9
?? 9 ?
?? 第 1 頁 / 共 4 頁
字號:
    BOOLEAN    self;
    OS_TCB    *ptcb;
    INT8U      y;
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif



#if OS_ARG_CHK_EN > 0u
    if (prio == OS_TASK_IDLE_PRIO) {                            /* Not allowed to suspend idle task    */
        return (OS_ERR_TASK_SUSPEND_IDLE);
    }
    if (prio >= OS_LOWEST_PRIO) {                               /* Task priority valid ?               */
        if (prio != OS_PRIO_SELF) {
            return (OS_ERR_PRIO_INVALID);
        }
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                                 /* See if suspend SELF                 */
        prio = OSTCBCur->OSTCBPrio;
        self = OS_TRUE;
    } else if (prio == OSTCBCur->OSTCBPrio) {                   /* See if suspending self              */
        self = OS_TRUE;
    } else {
        self = OS_FALSE;                                        /* No suspending another task          */
    }
    ptcb = OSTCBPrioTbl[prio];
    if (ptcb == (OS_TCB *)0) {                                  /* Task to suspend must exist          */
        OS_EXIT_CRITICAL();
        return (OS_ERR_TASK_SUSPEND_PRIO);
    }
    if (ptcb == OS_TCB_RESERVED) {                              /* See if assigned to Mutex            */
        OS_EXIT_CRITICAL();
        return (OS_ERR_TASK_NOT_EXIST);
    }
    y            = ptcb->OSTCBY;
    OSRdyTbl[y] &= (OS_PRIO)~ptcb->OSTCBBitX;                   /* Make task not ready                 */
    if (OSRdyTbl[y] == 0u) {
        OSRdyGrp &= (OS_PRIO)~ptcb->OSTCBBitY;
    }
    ptcb->OSTCBStat |= OS_STAT_SUSPEND;                         /* Status of task is 'SUSPENDED'       */
    OS_EXIT_CRITICAL();
    if (self == OS_TRUE) {                                      /* Context switch only if SELF         */
        OS_Sched();                                             /* Find new highest priority task      */
    }
    return (OS_ERR_NONE);
}
#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.
*
*              p_task_data  is a pointer to where the desired task's OS_TCB will be stored.
*
* Returns    : OS_ERR_NONE            if the requested task is suspended
*              OS_ERR_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_ERR_PRIO            if the desired task has not been created
*              OS_ERR_TASK_NOT_EXIST  if the task is assigned to a Mutex PIP
*              OS_ERR_PDATA_NULL      if 'p_task_data' is a NULL pointer
*********************************************************************************************************
*/

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



#if OS_ARG_CHK_EN > 0u
    if (prio > OS_LOWEST_PRIO) {                 /* Task priority valid ?                              */
        if (prio != OS_PRIO_SELF) {
            return (OS_ERR_PRIO_INVALID);
        }
    }
    if (p_task_data == (OS_TCB *)0) {            /* Validate 'p_task_data'                             */
        return (OS_ERR_PDATA_NULL);
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                  /* See if suspend SELF                                */
        prio = OSTCBCur->OSTCBPrio;
    }
    ptcb = OSTCBPrioTbl[prio];
    if (ptcb == (OS_TCB *)0) {                   /* Task to query must exist                           */
        OS_EXIT_CRITICAL();
        return (OS_ERR_PRIO);
    }
    if (ptcb == OS_TCB_RESERVED) {               /* Task to query must not be assigned to a Mutex      */
        OS_EXIT_CRITICAL();
        return (OS_ERR_TASK_NOT_EXIST);
    }
                                                 /* Copy TCB into user storage area                    */
    OS_MemCopy((INT8U *)p_task_data, (INT8U *)ptcb, sizeof(OS_TCB));
    OS_EXIT_CRITICAL();
    return (OS_ERR_NONE);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                 GET THE CURRENT VALUE OF A TASK REGISTER
*
* Description: This function is called to obtain the current value of a task register.  Task registers
*              are application specific and can be used to store task specific values such as 'error
*              numbers' (i.e. errno), statistics, etc.  Each task register can hold a 32-bit value.
*
* Arguments  : prio      is the priority of the task you want to get the task register from.  If you
*                        specify OS_PRIO_SELF then the task register of the current task will be obtained.
*
*              id        is the 'id' of the desired task register.  Note that the 'id' must be less
*                        than OS_TASK_REG_TBL_SIZE
*
*              perr      is a pointer to a variable that will hold an error code related to this call.
*
*                        OS_ERR_NONE            if the call was successful
*                        OS_ERR_PRIO_INVALID    if you specified an invalid priority
*                        OS_ERR_ID_INVALID      if the 'id' is not between 0 and OS_TASK_REG_TBL_SIZE-1
*
* Returns    : The current value of the task's register or 0 if an error is detected.
*
* Note(s)    : The maximum number of task variables is 254
*********************************************************************************************************
*/

#if OS_TASK_REG_TBL_SIZE > 0u
INT32U  OSTaskRegGet (INT8U   prio,
                      INT8U   id,
                      INT8U  *perr)
{
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif
    INT32U     value;
    OS_TCB    *ptcb;


#if OS_ARG_CHK_EN > 0u
    if (prio >= OS_LOWEST_PRIO) {
        if (prio != OS_PRIO_SELF) {
            *perr = OS_ERR_PRIO_INVALID;
            return (0u);
        }
    }
    if (id >= OS_TASK_REG_TBL_SIZE) {
        *perr = OS_ERR_ID_INVALID;
        return (0u);
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                  /* See if need to get register from current task      */
        ptcb = OSTCBCur;
    } else {
        ptcb = OSTCBPrioTbl[prio];
    }
    value = ptcb->OSTCBRegTbl[id];
    OS_EXIT_CRITICAL();
    *perr = OS_ERR_NONE;
    return (value);
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                 SET THE CURRENT VALUE OF A TASK VARIABLE
*
* Description: This function is called to change the current value of a task register.  Task registers
*              are application specific and can be used to store task specific values such as 'error
*              numbers' (i.e. errno), statistics, etc.  Each task register can hold a 32-bit value.
*
* Arguments  : prio      is the priority of the task you want to set the task register for.  If you
*                        specify OS_PRIO_SELF then the task register of the current task will be obtained.
*
*              id        is the 'id' of the desired task register.  Note that the 'id' must be less
*                        than OS_TASK_REG_TBL_SIZE
*
*              value     is the desired value for the task register.
*
*              perr      is a pointer to a variable that will hold an error code related to this call.
*
*                        OS_ERR_NONE            if the call was successful
*                        OS_ERR_PRIO_INVALID    if you specified an invalid priority
*                        OS_ERR_ID_INVALID      if the 'id' is not between 0 and OS_TASK_REG_TBL_SIZE-1
*
* Returns    : The current value of the task's variable or 0 if an error is detected.
*
* Note(s)    : The maximum number of task variables is 254
*********************************************************************************************************
*/

#if OS_TASK_REG_TBL_SIZE > 0u
void  OSTaskRegSet (INT8U    prio,
                    INT8U    id,
                    INT32U   value,
                    INT8U   *perr)
{
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif
    OS_TCB    *ptcb;


#if OS_ARG_CHK_EN > 0u
    if (prio >= OS_LOWEST_PRIO) {
        if (prio != OS_PRIO_SELF) {
            *perr = OS_ERR_PRIO_INVALID;
            return;
        }
    }
    if (id >= OS_TASK_REG_TBL_SIZE) {
        *perr = OS_ERR_ID_INVALID;
        return;
    }
#endif
    OS_ENTER_CRITICAL();
    if (prio == OS_PRIO_SELF) {                  /* See if need to get register from current task      */
        ptcb = OSTCBCur;
    } else {
        ptcb = OSTCBPrioTbl[prio];
    }
    ptcb->OSTCBRegTbl[id] = value;
    OS_EXIT_CRITICAL();
    *perr                 = OS_ERR_NONE;
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                              CATCH ACCIDENTAL TASK RETURN
*
* Description: This function is called if a task accidentally returns without deleting itself.  In other
*              words, a task should either be an infinite loop or delete itself if it's done.
*
* Arguments  : none
*
* Returns    : none
*
* Note(s)    : This function is INTERNAL to uC/OS-II and your application should not call it.
*********************************************************************************************************
*/

void  OS_TaskReturn (void)
{
    OSTaskReturnHook(OSTCBCur);                   /* Call hook to let user decide on what to do        */

#if OS_TASK_DEL_EN > 0u
    (void)OSTaskDel(OS_PRIO_SELF);                /* Delete task if it accidentally returns!           */
#else
    for (;;) {
        OSTimeDly(OS_TICKS_PER_SEC);
    }
#endif
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                        CLEAR TASK STACK
*
* Description: This function is used to clear the stack of a task (i.e. write all zeros)
*
* Arguments  : pbos     is a pointer to the task's bottom 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).  'pbos' will thus point to the lowest (valid) memory
*                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pbos' will point to the
*                       highest memory location of the stack and the stack will grow with increasing
*                       memory locations.  'pbos' MUST point to a valid 'free' data item.
*
*              size     is the number of 'stack elements' to clear.
*
*              opt      contains additional information (or options) about the behavior of the task.  The
*                       LOWER 8-bits are reserved by uC/OS-II while the upper 8 bits can be application
*                       specific.  See OS_TASK_OPT_??? in uCOS-II.H.
*
* Returns    : none
*********************************************************************************************************
*/
#if (OS_TASK_STAT_STK_CHK_EN > 0u) && (OS_TASK_CREATE_EXT_EN > 0u)
void  OS_TaskStkClr (OS_STK  *pbos,
                     INT32U   size,
                     INT16U   opt)
{
    if ((opt & OS_TASK_OPT_STK_CHK) != 0x0000u) {      /* See if stack checking has been enabled       */
        if ((opt & OS_TASK_OPT_STK_CLR) != 0x0000u) {  /* See if stack needs to be cleared             */
#if OS_STK_GROWTH == 1u
            while (size > 0u) {                        /* Stack grows from HIGH to LOW memory          */
                size--;
                *pbos++ = (OS_STK)0;                   /* Clear from bottom of stack and up!           */
            }
#else
            while (size > 0u) {                        /* Stack grows from LOW to HIGH memory          */
                size--;
                *pbos-- = (OS_STK)0;                   /* Clear from bottom of stack and down          */
            }
#endif
        }
    }
}

#endif
	 	   	  		 			 	    		   		 		 	 	 			 	    		   	 			 	  	 		 				 		  			 		 					 	  	  		      		  	   		      		  	 		 	      		   		 		  	 		 	      		  		  		  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人免费观看| 开心九九激情九九欧美日韩精美视频电影| 国产精品人妖ts系列视频| 亚洲综合偷拍欧美一区色| 久久99国产精品免费网站| 在线欧美小视频| 欧美国产精品一区| 精品在线一区二区三区| 欧美男生操女生| 亚洲欧洲一区二区在线播放| 国模大尺度一区二区三区| 欧美日韩成人综合天天影院| 国产精品无人区| 国产毛片精品一区| 欧美一级日韩不卡播放免费| 亚洲综合网站在线观看| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 久久新电视剧免费观看| 一区二区三区精密机械公司| www.欧美亚洲| 欧美国产一区二区在线观看| 国产尤物一区二区| 精品久久久久久久一区二区蜜臀| 亚洲图片欧美一区| 日本韩国一区二区三区| 日韩伦理免费电影| 91视频.com| 国产精品初高中害羞小美女文| 国产精品一级片在线观看| 久久综合色婷婷| 久久99国产精品尤物| 亚洲精品一区二区三区影院| 麻豆91在线看| 26uuu色噜噜精品一区二区| 精品亚洲国产成人av制服丝袜| 日韩一区二区在线看| 免费看精品久久片| 欧美va天堂va视频va在线| 久久国产欧美日韩精品| 日韩欧美黄色影院| 狠狠色丁香婷婷综合| 久久久午夜精品| 丁香激情综合国产| 亚洲欧洲制服丝袜| 欧美色倩网站大全免费| 亚洲成人一区二区在线观看| 制服丝袜中文字幕亚洲| 免费观看久久久4p| 久久久久亚洲蜜桃| 成人av电影免费观看| 亚洲色欲色欲www在线观看| 色婷婷久久综合| 日韩中文字幕不卡| 久久久亚洲精华液精华液精华液| 成人蜜臀av电影| 亚洲精品高清在线观看| 777久久久精品| 国产剧情一区二区| 亚洲码国产岛国毛片在线| 欧美人与z0zoxxxx视频| 国产精品一区2区| 亚洲精品菠萝久久久久久久| 日韩一区二区三区电影在线观看| 国产黄色精品网站| 玉米视频成人免费看| 欧美日韩国产一级片| 极品瑜伽女神91| 亚洲精品视频在线观看免费| 欧美一区二区精品久久911| 国产宾馆实践打屁股91| 一区二区三区蜜桃| 久久婷婷国产综合精品青草| 91精品1区2区| 国精品**一区二区三区在线蜜桃| 亚洲欧美成人一区二区三区| 日韩一区二区免费在线观看| 不卡的电影网站| 日韩电影在线观看电影| |精品福利一区二区三区| 91麻豆精品国产91久久久久久久久| 国产成人综合亚洲91猫咪| 亚洲国产精品久久一线不卡| 国产日韩亚洲欧美综合| 91精品国产91久久久久久最新毛片 | 午夜亚洲国产au精品一区二区| 精品国产不卡一区二区三区| 在线观看国产91| 国产一区二区在线电影| 五月激情六月综合| 综合分类小说区另类春色亚洲小说欧美 | 欧美成va人片在线观看| 色视频欧美一区二区三区| 精品一区二区三区免费观看| 亚洲一区二区三区四区五区中文 | 91精彩视频在线| 丁香桃色午夜亚洲一区二区三区| 亚洲va欧美va人人爽午夜| 18涩涩午夜精品.www| 久久精品亚洲麻豆av一区二区| 337p亚洲精品色噜噜| 欧亚一区二区三区| 91麻豆国产在线观看| 成人爽a毛片一区二区免费| 麻豆91在线播放| 日韩av中文在线观看| 亚洲二区视频在线| 亚洲综合激情网| 亚洲裸体在线观看| 亚洲免费av在线| 亚洲另类春色国产| 亚洲男女毛片无遮挡| 亚洲丝袜精品丝袜在线| 国产精品女主播av| 国产精品久久久久影院亚瑟| 国产日韩视频一区二区三区| 久久精品日韩一区二区三区| 欧美日韩在线播放三区四区| 99精品视频在线播放观看| 99精品视频一区二区三区| 成人三级在线视频| 成人aa视频在线观看| 成人app在线| 91国产福利在线| 欧美日韩一区二区在线观看 | 亚洲午夜精品在线| 亚洲一二三四区| 天天操天天干天天综合网| 日韩国产欧美在线播放| 久久国产视频网| 国产精品一二三| 91网上在线视频| 欧美日韩一级二级三级| 日韩一区二区中文字幕| 国产亚洲欧洲997久久综合| 久久色在线视频| 中文字幕日韩一区二区| 亚洲国产日产av| 精东粉嫩av免费一区二区三区| 国产精品资源在线看| 成人av免费在线播放| 欧美性一级生活| 欧美一区二区国产| 国产人妖乱国产精品人妖| 亚洲人快播电影网| 五月天亚洲精品| 国产成人精品在线看| 色婷婷亚洲婷婷| 日韩精品专区在线影院观看| 国产精品久久毛片av大全日韩| 亚洲国产成人av| 国模大尺度一区二区三区| 91丨porny丨国产入口| 91精品欧美久久久久久动漫| 国产视频一区不卡| 一个色综合av| 国产一区二区三区四区在线观看| 91啪亚洲精品| 日韩欧美在线影院| 亚洲免费观看高清在线观看| 免费看日韩精品| 色欧美乱欧美15图片| 日韩欧美www| 亚洲国产欧美在线人成| 国产精品自在在线| 日韩区在线观看| 亚洲综合久久久久| 国产白丝网站精品污在线入口| 欧美精品丝袜久久久中文字幕| 国产欧美一区二区三区在线看蜜臀| 天天爽夜夜爽夜夜爽精品视频| 成人一二三区视频| 日韩你懂的在线播放| 亚洲小少妇裸体bbw| 成人白浆超碰人人人人| 日韩午夜激情免费电影| 亚洲一区在线观看视频| 成人精品在线视频观看| 精品免费一区二区三区| 亚洲444eee在线观看| 日本韩国欧美在线| 国产精品黄色在线观看| 国产在线播放一区二区三区| 欧美精品久久天天躁| 一区二区日韩av| 91香蕉视频污| 成人免费一区二区三区在线观看| 国产精品综合网| 欧美电影免费观看高清完整版| 亚洲一区在线免费观看| 91搞黄在线观看| 亚洲人被黑人高潮完整版| www.久久精品| 中文字幕乱码一区二区免费| 国产精品自拍网站| 久久免费视频一区| 国产一区二区美女| 国产午夜精品福利| 国产91露脸合集magnet| 中文一区二区在线观看| 成人黄色免费短视频|