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

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

?? os_task.lst

?? uCos-ii 2.86 在C8051F410單片機(jī)上移植成功!!! 其中包括:UART驅(qū)動
?? LST
?? 第 1 頁 / 共 5 頁
字號:
 197          *                       memory to low memory).  'pstk' will thus point to the highest (valid) memory
 198          *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pstk' will point to the
 199          *                       lowest memory location of the stack and the stack will grow with increasing
 200          *                       memory locations.
 201          *
 202          *              prio     is the task's priority.  A unique priority MUST be assigned to each task and the
 203          *                       lower the number, the higher the priority.
 204          *
 205          * Returns    : OS_ERR_NONE             if the function was successful.
 206          *              OS_PRIO_EXIT            if the task priority already exist
 207          *                                      (each task MUST have a unique priority).
 208          *              OS_ERR_PRIO_INVALID     if the priority you specify is higher that the maximum allowed
 209          *                                      (i.e. >= OS_LOWEST_PRIO)
 210          *              OS_ERR_TASK_CREATE_ISR  if you tried to create a task from an ISR.
 211          *********************************************************************************************************
 212          */
 213          
 214          #if OS_TASK_CREATE_EN > 0
 215          INT8U  OSTaskCreate (void (*task)(void *p_arg), void *p_arg, OS_STK *ptos, INT8U prio) reentrant
 216          {
 217   1          OS_STK    *psp;
 218   1          INT8U      err;
 219   1      #if OS_CRITICAL_METHOD == 3                  /* Allocate storage for CPU status register               */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
 222   1      
 223   1      
 224   1      
 225   1      #if OS_ARG_CHK_EN > 0
                  if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */
                      return (OS_ERR_PRIO_INVALID);
                  }
              #endif
 230   1          OS_ENTER_CRITICAL();
 231   1          if (OSIntNesting > 0) {                  /* Make sure we don't create the task from within an ISR  */
 232   2              OS_EXIT_CRITICAL();
 233   2              return (OS_ERR_TASK_CREATE_ISR);
 234   2          }
 235   1          if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */
 236   2              OSTCBPrioTbl[prio] = OS_TCB_RESERVED;/* Reserve the priority to prevent others from doing ...  */
 237   2                                                   /* ... the same thing until task is created.              */
 238   2              OS_EXIT_CRITICAL();
C51 COMPILER V8.17   OS_TASK                                                               03/26/2009 14:24:25 PAGE 5   

 239   2              psp = OSTaskStkInit(task, p_arg, ptos, 0);              /* Initialize the task's stack         */
 240   2              err = OS_TCBInit(prio, psp, (OS_STK *)0, 0, 0, (void *)0, 0);
 241   2              if (err == OS_ERR_NONE) {
 242   3                  if (OSRunning == OS_TRUE) {      /* Find highest priority task if multitasking has started */
 243   4                      OS_Sched();
 244   4                  }
 245   3              } else {
 246   3                  OS_ENTER_CRITICAL();
 247   3                  OSTCBPrioTbl[prio] = (OS_TCB *)0;/* Make this priority available to others                 */
 248   3                  OS_EXIT_CRITICAL();
 249   3              }
 250   2              return (err);
 251   2          }
 252   1          OS_EXIT_CRITICAL();
 253   1          return (OS_ERR_PRIO_EXIST);
 254   1      }
 255          #endif
 256          /*$PAGE*/
 257          /*
 258          *********************************************************************************************************
 259          *                                     CREATE A TASK (Extended Version)
 260          *
 261          * Description: This function is used to have uC/OS-II manage the execution of a task.  Tasks can either
 262          *              be created prior to the start of multitasking or by a running task.  A task cannot be
 263          *              created by an ISR.  This function is similar to OSTaskCreate() except that it allows
 264          *              additional information about a task to be specified.
 265          *
 266          * Arguments  : task      is a pointer to the task's code
 267          *
 268          *              p_arg     is a pointer to an optional data area which can be used to pass parameters to
 269          *                        the task when the task first executes.  Where the task is concerned it thinks
 270          *                        it was invoked and passed the argument 'p_arg' as follows:
 271          *
 272          *                            void Task (void *p_arg)
 273          *                            {
 274          *                                for (;;) {
 275          *                                    Task code;
 276          *                                }
 277          *                            }
 278          *
 279          *              ptos      is a pointer to the task's top of stack.  If the configuration constant
 280          *                        OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high
 281          *                        memory to low memory).  'ptos' will thus point to the highest (valid) memory
 282          *                        location of the stack.  If OS_STK_GROWTH is set to 0, 'ptos' will point to the
 283          *                        lowest memory location of the stack and the stack will grow with increasing
 284          *                        memory locations.  'ptos' MUST point to a valid 'free' data item.
 285          *
 286          *              prio      is the task's priority.  A unique priority MUST be assigned to each task and the
 287          *                        lower the number, the higher the priority.
 288          *
 289          *              id        is the task's ID (0..65535)
 290          *
 291          *              pbos      is a pointer to the task's bottom of stack.  If the configuration constant
 292          *                        OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high
 293          *                        memory to low memory).  'pbos' will thus point to the LOWEST (valid) memory
 294          *                        location of the stack.  If OS_STK_GROWTH is set to 0, 'pbos' will point to the
 295          *                        HIGHEST memory location of the stack and the stack will grow with increasing
 296          *                        memory locations.  'pbos' MUST point to a valid 'free' data item.
 297          *
 298          *              stk_size  is the size of the stack in number of elements.  If OS_STK is set to INT8U,
 299          *                        'stk_size' corresponds to the number of bytes available.  If OS_STK is set to
 300          *                        INT16U, 'stk_size' contains the number of 16-bit entries available.  Finally, if
C51 COMPILER V8.17   OS_TASK                                                               03/26/2009 14:24:25 PAGE 6   

 301          *                        OS_STK is set to INT32U, 'stk_size' contains the number of 32-bit entries
 302          *                        available on the stack.
 303          *
 304          *              pext      is a pointer to a user supplied memory location which is used as a TCB extension.
 305          *                        For example, this user memory can hold the contents of floating-point registers
 306          *                        during a context switch, the time each task takes to execute, the number of times
 307          *                        the task has been switched-in, etc.
 308          *
 309          *              opt       contains additional information (or options) about the behavior of the task.  The
 310          *                        LOWER 8-bits are reserved by uC/OS-II while the upper 8 bits can be application
 311          *                        specific.  See OS_TASK_OPT_??? in uCOS-II.H.  Current choices are:
 312          *
 313          *                        OS_TASK_OPT_STK_CHK      Stack checking to be allowed for the task
 314          *                        OS_TASK_OPT_STK_CLR      Clear the stack when the task is created
 315          *                        OS_TASK_OPT_SAVE_FP      If the CPU has floating-point registers, save them
 316          *                                                 during a context switch.
 317          *
 318          * Returns    : OS_ERR_NONE             if the function was successful.
 319          *              OS_PRIO_EXIT            if the task priority already exist
 320          *                                      (each task MUST have a unique priority).
 321          *              OS_ERR_PRIO_INVALID     if the priority you specify is higher that the maximum allowed
 322          *                                      (i.e. > OS_LOWEST_PRIO)
 323          *              OS_ERR_TASK_CREATE_ISR  if you tried to create a task from an ISR.
 324          *********************************************************************************************************
 325          */
 326          /*$PAGE*/
 327          #if OS_TASK_CREATE_EXT_EN > 0
              INT8U  OSTaskCreateExt (void   (*task)(void *p_arg),
                                      void    *p_arg,
                                      OS_STK  *ptos,
                                      INT8U    prio,
                                      INT16U   id,
                                      OS_STK  *pbos,
                                      INT32U   stk_size,
                                      void    *pext,
                                      INT16U   opt) reentrant
              {
                  OS_STK    *psp;
                  INT8U      err;
              #if OS_CRITICAL_METHOD == 3                  /* Allocate storage for CPU status register               */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
              
              
              
              #if OS_ARG_CHK_EN > 0
                  if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */
                      return (OS_ERR_PRIO_INVALID);
                  }
              #endif
                  OS_ENTER_CRITICAL();
                  if (OSIntNesting > 0) {                  /* Make sure we don't create the task from within an ISR  */
                      OS_EXIT_CRITICAL();
                      return (OS_ERR_TASK_CREATE_ISR);
                  }
                  if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */
                      OSTCBPrioTbl[prio] = OS_TCB_RESERVED;/* Reserve the priority to prevent others from doing ...  */
                                                           /* ... the same thing until task is created.              */
                      OS_EXIT_CRITICAL();
              
              #if (OS_TASK_STAT_STK_CHK_EN > 0)
                      OS_TaskStkClr(pbos, stk_size, opt);                    /* Clear the task stack (if needed)     */
C51 COMPILER V8.17   OS_TASK                                                               03/26/2009 14:24:25 PAGE 7   

              #endif
              
                      psp = OSTaskStkInit(task, p_arg, ptos, opt);           /* Initialize the task's stack          */
                      err = OS_TCBInit(prio, psp, pbos, id, stk_size, pext, opt);
                      if (err == OS_ERR_NONE) {
                          if (OSRunning == OS_TRUE) {                        /* Find HPT if multitasking has started */
                              OS_Sched();
                          }
                      } else {
                          OS_ENTER_CRITICAL();
                          OSTCBPrioTbl[prio] = (OS_TCB *)0;                  /* Make this priority avail. to others  */
                          OS_EXIT_CRITICAL();
                      }
                      return (err);
                  }
                  OS_EXIT_CRITICAL();
                  return (OS_ERR_PRIO_EXIST);
              }
              #endif
 382          /*$PAGE*/
 383          /*
 384          *********************************************************************************************************
 385          *                                            DELETE A TASK
 386          *
 387          * Description: This function allows you to delete a task.  The calling task can delete itself by
 388          *              its own priority number.  The deleted task is returned to the dormant state and can be
 389          *              re-activated by creating the deleted task again.
 390          *
 391          * Arguments  : prio    is the priority of the task to delete.  Note that you can explicitely delete
 392          *                      the current task without knowing its priority level by setting 'prio' to
 393          *                      OS_PRIO_SELF.
 394          *
 395          * Returns    : OS_ERR_NONE             if the call is successful
 396          *              OS_ERR_TASK_DEL_IDLE    if you attempted to delete uC/OS-II's idle task
 397          *              OS_ERR_PRIO_INVALID     if the priority you specify is higher that the maximum allowed
 398          *                                      (i.e. >= OS_LOWEST_PRIO) or, you have not specified OS_PRIO_SELF.
 399          *              OS_ERR_TASK_DEL         if the task is assigned to a Mutex PIP.   
 400          *              OS_ERR_TASK_NOT_EXIST   if the task you want to delete does not exist.
 401          *              OS_ERR_TASK_DEL_ISR     if you tried to delete a task from an ISR
 402          *
 403          * Notes      : 1) To reduce interrupt latency, OSTaskDel() 'disables' the task:
 404          *                    a) by making it not ready

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品伊人久久久久av影院 | 狠狠色丁香婷婷综合久久片| 欧美亚洲免费在线一区| 国产欧美一区视频| 99久久免费精品| 亚洲一区二区三区四区五区中文| 欧洲视频一区二区| 亚洲无人区一区| 日韩一区二区高清| 国产精品 欧美精品| 日韩一区在线看| 欧美日韩亚洲高清一区二区| 日韩中文字幕不卡| 久久久久久久久久久久久久久99| 国产成人av影院| 69p69国产精品| 亚洲欧美另类图片小说| 精品国产乱码久久久久久1区2区| 欧美日韩在线精品一区二区三区激情| 国产99一区视频免费| 狠狠久久亚洲欧美| 亚洲国产日日夜夜| 久久久国产午夜精品| 欧美专区亚洲专区| 国产乱码精品一区二区三区av| 久久久久久影视| 91麻豆自制传媒国产之光| 蜜桃精品视频在线观看| 国产精品污www在线观看| 91蜜桃在线免费视频| 国产精品自拍三区| 亚洲成人av电影| 亚洲精品国产无天堂网2021| 久久精品一区二区三区不卡| 9191成人精品久久| 国产aⅴ综合色| 免费观看一级特黄欧美大片| 亚洲视频网在线直播| 久久久久久久久久久电影| www..com久久爱| 国产精品亚洲成人| 美女脱光内衣内裤视频久久网站| 一区二区三区日韩在线观看| 欧美va天堂va视频va在线| 欧美一区二区三区视频| 在线一区二区观看| 91视频国产资源| 成人少妇影院yyyy| 国产精品综合久久| 精品一区二区三区在线观看| 美脚の诱脚舐め脚责91| 偷拍日韩校园综合在线| 亚洲国产成人av好男人在线观看| 日韩毛片一二三区| 伊人开心综合网| 亚洲精品乱码久久久久久 | 韩国成人精品a∨在线观看| 国产精品美女久久久久久久久久久| 久久人人超碰精品| 久久综合狠狠综合久久综合88 | 久久久久久97三级| 国产亚洲一区二区在线观看| 精品精品欲导航| 久久久不卡影院| 免费在线成人网| 午夜激情久久久| 日韩国产精品大片| 国产一区二区三区不卡在线观看 | 欧美日韩精品一区二区三区| 欧美大片免费久久精品三p| 日韩视频免费观看高清完整版在线观看 | 欧美剧在线免费观看网站 | 午夜日韩在线电影| 国产专区欧美精品| 99久久精品免费看| 日韩一级大片在线| 国产欧美日韩视频一区二区| 国产精品私房写真福利视频| 亚洲色图欧洲色图| 午夜不卡av免费| 国产成人一区在线| a美女胸又www黄视频久久| 国产精品一级在线| 欧美日韩一区二区三区四区| 精品va天堂亚洲国产| 国产精品毛片久久久久久久| 亚洲女人****多毛耸耸8| 日本亚洲欧美天堂免费| 韩国一区二区三区| 在线观看国产91| 中文字幕一区二区三中文字幕| 五月天一区二区三区| 国产成人av电影在线观看| 欧美日韩激情一区二区| 国产精品久久久久9999吃药| 久久成人免费日本黄色| 欧美日韩在线综合| 日韩理论片一区二区| 国产在线不卡一区| 欧美日韩国产123区| 亚洲制服丝袜av| 国产91综合一区在线观看| 欧美午夜精品一区二区三区 | 蜜臂av日日欢夜夜爽一区| 欧美天堂亚洲电影院在线播放| 国产精品三级视频| 国产高清久久久| 日韩欧美色电影| 亚洲18影院在线观看| 成人午夜视频免费看| 欧美国产精品中文字幕| 精品在线免费观看| 精品福利一区二区三区免费视频| 美日韩一级片在线观看| 欧美女孩性生活视频| 亚洲丝袜美腿综合| 成人av免费观看| 《视频一区视频二区| 9久草视频在线视频精品| 国产精品美女久久久久aⅴ | 5月丁香婷婷综合| 一区二区三区蜜桃网| 99精品视频一区二区三区| 亚洲欧美另类小说视频| 欧美日韩综合不卡| 日韩精品视频网站| 久久老女人爱爱| 风间由美性色一区二区三区| 最新国产精品久久精品| 欧美三级视频在线观看| 蜜桃视频在线一区| 国产精品久久久久影院老司| 在线免费观看一区| 免费成人结看片| 亚洲女子a中天字幕| 欧美美女黄视频| 日韩成人伦理电影在线观看| 欧美人体做爰大胆视频| 午夜精品福利久久久| 精品国产91亚洲一区二区三区婷婷| 成人爱爱电影网址| 日韩精品高清不卡| 国产精品色在线| 欧美人狂配大交3d怪物一区| 国产九色sp调教91| 午夜精品久久久久久| 国产精品久久久一本精品| 777xxx欧美| 在线国产电影不卡| 成人在线一区二区三区| 裸体歌舞表演一区二区| 夜夜嗨av一区二区三区四季av| 久久网这里都是精品| 欧美日韩在线综合| jvid福利写真一区二区三区| 极品美女销魂一区二区三区免费| 亚洲成人你懂的| 亚洲男人天堂av网| 国产亚洲成aⅴ人片在线观看| 色悠悠久久综合| 国产精品1区二区.| 美美哒免费高清在线观看视频一区二区| 一区二区三区欧美在线观看| 欧美精品一区二区在线观看| 91久久奴性调教| 91免费观看视频在线| 懂色av一区二区三区蜜臀| 韩国av一区二区三区四区| 蜜桃视频在线一区| 日本v片在线高清不卡在线观看| 一区二区在线观看免费视频播放 | 久久久电影一区二区三区| 欧美欧美欧美欧美| 欧美色电影在线| 欧美色图片你懂的| 欧美日本视频在线| 91精品国产乱| 精品日韩99亚洲| 日韩天堂在线观看| 91麻豆精品国产| 欧美日精品一区视频| 欧美日韩精品一区二区三区蜜桃 | 欧美亚洲综合在线| av男人天堂一区| 成人av网站在线观看免费| 在线观看日韩一区| 精品乱码亚洲一区二区不卡| 中日韩av电影| 日韩综合小视频| 成人永久看片免费视频天堂| 在线精品观看国产| 精品国产乱码久久久久久久久| 中文字幕中文字幕中文字幕亚洲无线| 一区二区三区影院| 蜜桃视频在线观看一区二区| aa级大片欧美| 日韩精品在线一区二区| 国产精品第13页| 国产美女视频91| 欧美电影影音先锋|