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

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

?? os_task.lst

?? keil下單片機C8051F020的源程序
?? LST
?? 第 1 頁 / 共 4 頁
字號:
C51 COMPILER V7.50   OS_TASK                                                               12/12/2007 16:55:25 PAGE 4   

 179   1          if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */
 180   2              return (OS_PRIO_INVALID);
 181   2          }
 182   1          OS_ENTER_CRITICAL();
 183   1          if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */
 184   2              OSTCBPrioTbl[prio] = (OS_TCB *)1;    /* Reserve the priority to prevent others from doing ...  */
 185   2                                                   /* ... the same thing until task is created.              */
 186   2              OS_EXIT_CRITICAL();
 187   2              psp = (void *)OSTaskStkInit(task, ppdata, ptos, 0); /* Initialize the task's stack              */
 188   2              err = OSTCBInit(prio, psp, (void *)0, 0, 0, (void *)0, 0);         
 189   2              if (err == OS_NO_ERR) {
 190   3                  OS_ENTER_CRITICAL();
 191   3                  OSTaskCtr++;                                   /* Increment the #tasks counter             */
 192   3                  OSTaskCreateHook(OSTCBPrioTbl[prio]);          /* Call user defined hook                   */
 193   3                  OS_EXIT_CRITICAL();
 194   3                  if (OSRunning) {                 /* Find highest priority task if multitasking has started */
 195   4                      OSSched();
 196   4                  }
 197   3              } else {
 198   3                  OS_ENTER_CRITICAL();
 199   3                  OSTCBPrioTbl[prio] = (OS_TCB *)0;/* Make this priority available to others                 */
 200   3                  OS_EXIT_CRITICAL();
 201   3              }
 202   2              return (err);
 203   2          } else {
 204   2              OS_EXIT_CRITICAL();
 205   2              return (OS_PRIO_EXIST);
 206   2          }
 207   1      }
 208          #endif
 209          /*$PAGE*/
 210          /*
 211          *********************************************************************************************************
 212          *                                     CREATE A TASK (Extended Version)
 213          *
 214          * Description: This function is used to have uC/OS-II manage the execution of a task.  Tasks can either
 215          *              be created prior to the start of multitasking or by a running task.  A task cannot be
 216          *              created by an ISR.  This function is similar to OSTaskCreate() except that it allows
 217          *              additional information about a task to be specified.
 218          *
 219          * Arguments  : task     is a pointer to the task's code
 220          *
 221          *              pdata    is a pointer to an optional data area which can be used to pass parameters to
 222          *                       the task when the task first executes.  Where the task is concerned it thinks
 223          *                       it was invoked and passed the argument 'pdata' as follows:
 224          *
 225          *                           void Task (void *pdata)
 226          *                           {
 227          *                               for (;;) {
 228          *                                   Task code;
 229          *                               }
 230          *                           }
 231          *
 232          *              ptos     is a pointer to the task's top of stack.  If the configuration constant 
 233          *                       OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high
 234          *                       memory to low memory).  'pstk' will thus point to the highest (valid) memory 
 235          *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pstk' will point to the 
 236          *                       lowest memory location of the stack and the stack will grow with increasing
 237          *                       memory locations.  'pstk' MUST point to a valid 'free' data item.
 238          *
 239          *              prio     is the task's priority.  A unique priority MUST be assigned to each task and the
 240          *                       lower the number, the higher the priority.
C51 COMPILER V7.50   OS_TASK                                                               12/12/2007 16:55:25 PAGE 5   

 241          *
 242          *              id       is the task's ID (0..65535)
 243          *
 244          *              pbos     is a pointer to the task's bottom of stack.  If the configuration constant 
 245          *                       OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high
 246          *                       memory to low memory).  'pbos' will thus point to the LOWEST (valid) memory 
 247          *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pbos' will point to the 
 248          *                       HIGHEST memory location of the stack and the stack will grow with increasing
 249          *                       memory locations.  'pbos' MUST point to a valid 'free' data item.
 250          *
 251          *              stk_size is the size of the stack in number of elements.  If OS_STK is set to INT8U,
 252          *                       'stk_size' corresponds to the number of bytes available.  If OS_STK is set to
 253          *                       INT16U, 'stk_size' contains the number of 16-bit entries available.  Finally, if
 254          *                       OS_STK is set to INT32U, 'stk_size' contains the number of 32-bit entries
 255          *                       available on the stack.
 256          *
 257          *              pext     is a pointer to a user supplied memory location which is used as a TCB extension.
 258          *                       For example, this user memory can hold the contents of floating-point registers
 259          *                       during a context switch, the time each task takes to execute, the number of times
 260          *                       the task has been switched-in, etc. 
 261          *
 262          *              opt      contains additional information (or options) about the behavior of the task.  The 
 263          *                       LOWER 8-bits are reserved by uC/OS-II while the upper 8 bits can be application 
 264          *                       specific.  See OS_TASK_OPT_??? in uCOS-II.H.
 265          *
 266          * Returns    : OS_NO_ERR        if the function was successful.
 267          *              OS_PRIO_EXIT     if the task priority already exist 
 268          *                               (each task MUST have a unique priority).
 269          *              OS_PRIO_INVALID  if the priority you specify is higher that the maximum allowed 
 270          *                               (i.e. > OS_LOWEST_PRIO)
 271          *********************************************************************************************************
 272          */
 273          /*$PAGE*/
 274          #if   OS_TASK_CREATE_EXT_EN    
              INT8U OSTaskCreateExt (void   (*task)(void *pd), 
                                     void    *ppdata, 
                                     OS_STK  *ptos, 
                                     INT8U    prio,
                                     INT16U   id,
                                     OS_STK  *pbos,
                                     INT32U   stk_size,
                                     void    *pext,
                                     INT16U   opt) reentrant
              {
                  void    *psp;
                  INT8U    err;
                  INT16U   i;
                  OS_STK  *pfill;
              
              
                  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();
                      
                      if (opt & OS_TASK_OPT_STK_CHK) {     /* See if stack checking has been enabled                 */
                          if (opt & OS_TASK_OPT_STK_CLR) { /* See if stack needs to be cleared                       */
                              pfill = pbos;                /* Yes, fill the stack with zeros                         */
C51 COMPILER V7.50   OS_TASK                                                               12/12/2007 16:55:25 PAGE 6   

                              for (i = 0; i < stk_size; i++) {
                                  #if OS_STK_GROWTH == 1
                                  *pfill++ = (OS_STK)0;
                                  #else
                                  *pfill-- = (OS_STK)0;
                                  #endif
                              }
                          }
                      }
                      
                      psp = (void *)OSTaskStkInit(task, ppdata, ptos, opt); /* Initialize the task's stack            */
                      err = OSTCBInit(prio, psp, pbos, id, stk_size, pext, opt);         
                      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
 335          /*$PAGE*/
 336          /*
 337          *********************************************************************************************************
 338          *                                            DELETE A TASK
 339          *
 340          * Description: This function allows you to delete a task.  The calling task can delete itself by 
 341          *              its own priority number.  The deleted task is returned to the dormant state and can be
 342          *              re-activated by creating the deleted task again.
 343          *
 344          * Arguments  : prio    is the priority of the task to delete.  Note that you can explicitely delete
 345          *                      the current task without knowing its priority level by setting 'prio' to
 346          *                      OS_PRIO_SELF.
 347          *
 348          * Returns    : OS_NO_ERR           if the call is successful
 349          *              OS_TASK_DEL_IDLE    if you attempted to delete uC/OS-II's idle task
 350          *              OS_PRIO_INVALID     if the priority you specify is higher that the maximum allowed 
 351          *                                  (i.e. >= OS_LOWEST_PRIO) or, you have not specified OS_PRIO_SELF.
 352          *              OS_TASK_DEL_ERR     if the task you want to delete does not exist
 353          *              OS_TASK_DEL_ISR     if you tried to delete a task from an ISR
 354          *
 355          * Notes      : 1) To reduce interrupt latency, OSTaskDel() 'disables' the task:
 356          *                    a) by making it not ready
 357          *                    b) by removing it from any wait lists
 358          *                    c) by preventing OSTimeTick() from making the task ready to run.
 359          *                 The task can then be 'unlinked' from the miscellaneous structures in uC/OS-II.
 360          *              2) The function OSDummy() is called after OS_EXIT_CRITICAL() because, on most processors, 
 361          *                 the next instruction following the enable interrupt instruction is ignored.  You can 
 362          *                 replace OSDummy() with a macro that basically executes a NO OP (i.e. OS_NOP()).  The 
 363          *                 NO OP macro would avoid the execution time of the function call and return.
 364          *              3) An ISR cannot delete a task.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品中文在线影院| 欧美精品高清视频| 精品对白一区国产伦| 免费高清视频精品| 日韩午夜在线观看| 国产成人精品一区二区三区网站观看| 精品国偷自产国产一区| 国产精品2024| 一区二区三区欧美亚洲| 91精品国产综合久久精品| 韩国女主播一区| 亚洲精品高清在线观看| 欧美电影影音先锋| 91视频在线观看免费| 狠狠色2019综合网| 91国在线观看| 制服丝袜中文字幕一区| 久久久青草青青国产亚洲免观| 欧美大片一区二区| 中文字幕日韩av资源站| 亚洲福利一二三区| 国产不卡视频在线观看| 欧美亚洲禁片免费| 欧美无人高清视频在线观看| 99久久久精品免费观看国产蜜| 久久不见久久见中文字幕免费| 青青草伊人久久| 韩国一区二区在线观看| 国产在线播放一区| 精品欧美一区二区三区精品久久| jizz一区二区| 欧美视频在线一区二区三区 | 天天综合色天天| 一区二区三区在线视频观看58| 亚洲欧美激情小说另类| 亚洲国产欧美在线| 日韩精品亚洲专区| 国产麻豆91精品| 色婷婷激情久久| 欧美美女一区二区在线观看| 国产精品久久久一区麻豆最新章节| 国产精品原创巨作av| 国产精品一区二区果冻传媒| 91在线视频在线| 一区二区三区av电影| 欧美精品欧美精品系列| 蜜桃一区二区三区在线| 久久久久久久久久电影| 成人不卡免费av| 亚洲一区国产视频| 精品久久久三级丝袜| 欧美视频一二三区| 色天天综合久久久久综合片| 亚洲欧美电影院| 欧美日韩综合在线| 久久电影国产免费久久电影| 久久久午夜精品理论片中文字幕| 国产高清成人在线| 亚洲你懂的在线视频| 欧美高清hd18日本| 韩国欧美国产1区| av资源站一区| 亚洲成人av免费| 精品国产乱码久久久久久闺蜜| 国产精品18久久久久久久网站| 中文字幕中文字幕一区二区 | 国产精品网站在线播放| 99国产精品久| 久久电影网站中文字幕| 91一区二区在线观看| 在线观看亚洲一区| 亚洲视频一二三区| 国产乱人伦偷精品视频不卡| 欧美一区二区三区系列电影| 亚洲精品中文在线影院| 正在播放亚洲一区| 麻豆视频一区二区| 亚洲国产精品ⅴa在线观看| 日韩一区二区三区免费看 | 成人福利视频网站| 欧美一区二区三区在线观看| 亚洲精品水蜜桃| 在线电影院国产精品| 日韩二区在线观看| 中文字幕av在线一区二区三区| 色综合久久88色综合天天6| 免费视频一区二区| 丝袜美腿一区二区三区| 成人av动漫在线| 99精品欧美一区二区三区小说| 成人免费高清视频| 91在线porny国产在线看| 欧美中文字幕一二三区视频| 91精品国产综合久久精品app| 欧美日韩国产乱码电影| 国产欧美一二三区| 午夜精品福利视频网站| 亚洲va欧美va人人爽午夜| 精品久久99ma| 欧美一区二区三区色| 精品视频999| 91网站最新网址| 国内精品视频666| 国产黄色精品视频| 精品一二三四区| 成人午夜免费视频| 91色在线porny| 欧美日韩美少妇| 日韩久久久久久| 国产欧美日韩中文久久| 久久精品视频一区二区三区| 激情成人综合网| 91蜜桃在线免费视频| 国产寡妇亲子伦一区二区| 蜜桃av噜噜一区| 老司机午夜精品| 美国三级日本三级久久99| 蜜桃精品视频在线| 老司机午夜精品| 国产乱码精品一区二区三| 国产精品一级二级三级| 国产成人亚洲综合a∨猫咪| 国产一二三精品| 91精品国产乱码久久蜜臀| 91麻豆精品国产无毒不卡在线观看 | 欧美一卡二卡三卡四卡| 国产美女久久久久| 粉嫩欧美一区二区三区高清影视| 寂寞少妇一区二区三区| 色综合欧美在线视频区| 一本色道久久综合狠狠躁的推荐| 91高清在线观看| 精品1区2区在线观看| 亚洲精品中文在线影院| 国产综合成人久久大片91| 欧美日韩黄色影视| 欧美大片在线观看| 欧美裸体bbwbbwbbw| 免费欧美在线视频| 亚洲一卡二卡三卡四卡无卡久久| 日本在线播放一区二区三区| 全部av―极品视觉盛宴亚洲| 成人午夜看片网址| 日韩免费视频线观看| 国产一区二区主播在线| 久久久午夜精品理论片中文字幕| 免费欧美在线视频| 亚洲六月丁香色婷婷综合久久| 欧美日韩的一区二区| 日日嗨av一区二区三区四区| 中文字幕欧美日韩一区| 色综合天天综合狠狠| 91麻豆免费在线观看| 日韩精品在线一区| aa级大片欧美| 全部av―极品视觉盛宴亚洲| 欧美mv和日韩mv国产网站| 一区二区免费视频| 欧美日韩在线播放三区| 亚洲美女精品一区| 91搞黄在线观看| 久久国产精品色| 国产亚洲精品bt天堂精选| 国产成都精品91一区二区三| 国产精品精品国产色婷婷| 99精品1区2区| 日日夜夜免费精品视频| 777奇米成人网| 成人免费毛片高清视频| 18成人在线视频| 91精品免费在线观看| 天天av天天翘天天综合网色鬼国产| 亚洲国产日韩a在线播放性色| 久久99精品久久久久婷婷| 91免费看`日韩一区二区| 日韩女优制服丝袜电影| 亚洲小说春色综合另类电影| 国产69精品久久久久毛片| 欧美一区二区私人影院日本| 亚洲精品五月天| 99re成人精品视频| 欧美激情一区在线| 国内成人精品2018免费看| 欧美一区日本一区韩国一区| 一区二区欧美精品| 色综合久久中文综合久久97| 欧美国产亚洲另类动漫| 国产一区二区三区黄视频| 精品日韩av一区二区| 日本伊人色综合网| 欧美高清性hdvideosex| 亚洲精品一二三| 色婷婷精品久久二区二区蜜臀av | 性感美女极品91精品| 成人一道本在线| 国产精品嫩草久久久久| 国产99久久久久久免费看农村| 精品剧情在线观看| 激情文学综合网| 久久久综合精品|