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

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

?? os_core.lst

?? 該源碼是本人經調試通過的UCOS2操作系統在51單片機上移植好的源代碼
?? LST
?? 第 1 頁 / 共 5 頁
字號:
 838   2              OSTCBPrioTbl[i] = (OS_TCB *)0;
 839   2          }
 840   1          ptcb1 = &OSTCBTbl[0];
 841   1          ptcb2 = &OSTCBTbl[1];
 842   1          for (i = 0; i < (OS_MAX_TASKS + OS_N_SYS_TASKS - 1); i++) {  /* Init. list of free TCBs               
             -   */
 843   2              ptcb1->OSTCBNext = ptcb2;
 844   2              ptcb1++;
 845   2              ptcb2++;
 846   2          }
 847   1          ptcb1->OSTCBNext = (OS_TCB *)0;                              /* Last OS_TCB                           
             -   */
 848   1          OSTCBFreeList    = &OSTCBTbl[0];
 849   1      }
 850          /*$PAGE*/
 851          /*
 852          *********************************************************************************************************
 853          *                                              SCHEDULER
 854          *
 855          * Description: This function is called by other uC/OS-II services to determine whether a new, high
 856          *              priority task has been made ready to run.  This function is invoked by TASK level code
 857          *              and is not used to reschedule tasks from ISRs (see OSIntExit() for ISR rescheduling).
 858          *
 859          * Arguments  : none
 860          *
 861          * Returns    : none
 862          *
 863          * Notes      : 1) This function is INTERNAL to uC/OS-II and your application should not call it.
 864          *              2) Rescheduling is prevented when the scheduler is locked (see OS_SchedLock())
 865          *********************************************************************************************************
 866          */
 867          
C51 COMPILER V7.20   OS_CORE                                                               09/25/2006 10:08:38 PAGE 16  

 868          void  OS_Sched (void)  reentrant
 869          {
 870   1      #if OS_CRITICAL_METHOD == 3                            /* Allocate storage for CPU status register     */
                  OS_CPU_SR  cpu_sr;
              #endif    
 873   1          INT8U      y;
 874   1      
 875   1      
 876   1          OS_ENTER_CRITICAL();
 877   1          if ((OSIntNesting == 0) && (OSLockNesting == 0)) { /* Sched. only if all ISRs done & not locked    */
 878   2              y             = OSUnMapTbl[OSRdyGrp];          /* Get pointer to HPT ready to run              */
 879   2              OSPrioHighRdy = (INT8U)((y << 3) + OSUnMapTbl[OSRdyTbl[y]]);
 880   2              if (OSPrioHighRdy != OSPrioCur) {              /* No Ctx Sw if current task is highest rdy     */
 881   3                  OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy];
 882   3                  OSCtxSwCtr++;                              /* Increment context switch counter             */
 883   3                  OS_TASK_SW();                              /* Perform a context switch                     */
 884   3              }
 885   2          }
 886   1          OS_EXIT_CRITICAL();
 887   1      }
 888          /*$PAGE*/
 889          /*
 890          *********************************************************************************************************
 891          *                                              IDLE TASK
 892          *
 893          * Description: This task is internal to uC/OS-II and executes whenever no other higher priority tasks
 894          *              executes because they are ALL waiting for event(s) to occur.
 895          *
 896          * Arguments  : none
 897          *
 898          * Returns    : none
 899          *
 900          * Note(s)    : 1) OSTaskIdleHook() is called after the critical section to ensure that interrupts will be
 901          *                 enabled for at least a few instructions.  On some processors (ex. Philips XA), enabling
 902          *                 and then disabling interrupts didn't allow the processor enough time to have interrupts
 903          *                 enabled before they were disabled again.  uC/OS-II would thus never recognize
 904          *                 interrupts.
 905          *              2) This hook has been added to allow you to do such things as STOP the CPU to conserve 
 906          *                 power.
 907          *********************************************************************************************************
 908          */
 909          
 910          void  OS_TaskIdle (void *ppdata)  reentrant
 911          {
 912   1      #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif    
 915   1          
 916   1          
 917   1          ppdata = ppdata;                               /* Prevent compiler warning for not using 'pdata'     *
             -/
 918   1          for (;;) {
 919   2              OS_ENTER_CRITICAL();
 920   2              OSIdleCtr++;
 921   2              OS_EXIT_CRITICAL();
 922   2      
 923   2                      #if OS_CPU_HOOKS_EN
                      OSTaskIdleHook();                        /* Call user definable HOOK                           */
                              #endif
 926   2          }
 927   1      }
 928          /*$PAGE*/
C51 COMPILER V7.20   OS_CORE                                                               09/25/2006 10:08:38 PAGE 17  

 929          /*
 930          *********************************************************************************************************
 931          *                                            STATISTICS TASK
 932          *
 933          * Description: This task is internal to uC/OS-II and is used to compute some statistics about the
 934          *              multitasking environment.  Specifically, OS_TaskStat() computes the CPU usage.
 935          *              CPU usage is determined by:
 936          *
 937          *                                          OSIdleCtr
 938          *                 OSCPUUsage = 100 * (1 - ------------)     (units are in %)
 939          *                                         OSIdleCtrMax
 940          *
 941          * Arguments  : pdata     this pointer is not used at this time.
 942          *
 943          * Returns    : none
 944          *
 945          * Notes      : 1) This task runs at a priority level higher than the idle task.  In fact, it runs at the
 946          *                 next higher priority, OS_IDLE_PRIO-1.
 947          *              2) You can disable this task by setting the configuration #define OS_TASK_STAT_EN to 0.
 948          *              3) We delay for 5 seconds in the beginning to allow the system to reach steady state and
 949          *                 have all other tasks created before we do statistics.  You MUST have at least a delay
 950          *                 of 2 seconds to allow for the system to establish the maximum value for the idle
 951          *                 counter.
 952          *********************************************************************************************************
 953          */
 954          
 955          #if OS_TASK_STAT_EN > 0
              void  OS_TaskStat (void *ppdata)  reentrant
              {
              #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif    
                  INT32U     run;
                  INT32U     max;
                  INT8S      usage;
              
              
                  ppdata = ppdata;                               /* Prevent compiler warning for not using 'pdata'     *
             -/
                  while (OSStatRdy == FALSE) {
                      OSTimeDly(2 * OS_TICKS_PER_SEC);         /* Wait until statistic task is ready                 */
                  }
                  max = OSIdleCtrMax / 100L;
                  for (;;) {
                      OS_ENTER_CRITICAL();
                      OSIdleCtrRun = OSIdleCtr;                /* Obtain the of the idle counter for the past second */
                      run          = OSIdleCtr;
                      OSIdleCtr    = 0L;                       /* Reset the idle counter for the next second         */
                      OS_EXIT_CRITICAL();
                      if (max > 0L) {
                          usage = (INT8S)(100L - run / max);
                          if (usage >= 0) {                    /* Make sure we don't have a negative percentage      */
                              OSCPUUsage = usage;
                          } else {
                              OSCPUUsage = 0;
                          }
                      } else {
                          OSCPUUsage = 0;
                          max        = OSIdleCtrMax / 100L;
                      }
              
                              #if OS_CPU_HOOKS_EN
C51 COMPILER V7.20   OS_CORE                                                               09/25/2006 10:08:38 PAGE 18  

                      OSTaskStatHook();                        /* Invoke user definable hook                         */
                              #endif
              
                      OSTimeDly(OS_TICKS_PER_SEC);             /* Accumulate OSIdleCtr for the next second           */
                  }
              }
              #endif
 997          /*$PAGE*/
 998          /*
 999          *********************************************************************************************************
1000          *                                            INITIALIZE TCB
1001          *
1002          * Description: This function is internal to uC/OS-II and is used to initialize a Task Control Block when
1003          *              a task is created (see OSTaskCreate() and OSTaskCreateExt()).
1004          *
1005          * Arguments  : prio          is the priority of the task being created
1006          *
1007          *              ptos          is a pointer to the task's top-of-stack assuming that the CPU registers
1008          *                            have been placed on the stack.  Note that the top-of-stack corresponds to a
1009          *                            'high' memory location is OS_STK_GROWTH is set to 1 and a 'low' memory
1010          *                            location if OS_STK_GROWTH is set to 0.  Note that stack growth is CPU
1011          *                            specific.
1012          *
1013          *              pbos          is a pointer to the bottom of stack.  A NULL pointer is passed if called by
1014          *                            'OSTaskCreate()'.
1015          *
1016          *              id            is the task's ID (0..65535)
1017          *
1018          *              stk_size      is the size of the stack (in 'stack units').  If the stack units are INT8Us
1019          *                            then, 'stk_size' contains the number of bytes for the stack.  If the stack
1020          *                            units are INT32Us then, the stack contains '4 * stk_size' bytes.  The stack
1021          *                            units are established by the #define constant OS_STK which is CPU
1022          *                            specific.  'stk_size' is 0 if called by 'OSTaskCreate()'.
1023          *
1024          *              pext          is a pointer to a user supplied memory area that is used to extend the task
1025          *                            control block.  This allows you to store the contents of floating-point
1026          *                            registers, MMU registers or anything else you could find useful during a
1027          *                            context switch.  You can even assign a name to each task and store this name
1028          *                            in this TCB extension.  A NULL pointer is passed if called by OSTaskCreate().
1029          *
1030          *              opt           options as passed to 'OSTaskCreateExt()' or,
1031          *                            0 if called from 'OSTaskCreate()'.
1032          *
1033          * Returns    : OS_NO_ERR         if the call was successful
1034          *              OS_NO_MORE_TCB    if there are no more free TCBs to be allocated and thus, the task cannot
1035          *                                be created.
1036          *
1037          * Note       : This function is INTERNAL to uC/OS-II and your application should not call it.
1038          *********************************************************************************************************
1039          */
1040          
1041          INT8U  OS_TCBInit (INT8U prio, OS_STK *ptos, OS_STK *pbos, INT16U id, INT32U stk_size, void *pext, INT16U 
             -opt)  reentrant
1042          {
1043   1      #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
                  OS_CPU_SR  cpu_sr;
              #endif    
1046   1          OS_TCB    *ptcb;
1047   1      
1048   1      
1049   1          OS_ENTER_CRITICAL();
1050   1          ptcb = OSTCBFreeList;                                  /* Get a free TCB from the free TCB list    */
C51 COMPILER V7.20   OS_CORE                                                               09/25/2006 10:08:38 PAGE 19  

1051   1          if (ptcb != (OS_TCB *)0) {
1052   2              OSTCBFreeList        = ptcb->OSTCBNext;            /* Update pointer to free TCB list          */
1053   2              OS_EXIT_CRITICAL();
1054   2           

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产三级人妇| 秋霞午夜鲁丝一区二区老狼| 久久久噜噜噜久久人人看| 日韩三级免费观看| 欧美美女视频在线观看| 欧洲av一区二区嗯嗯嗯啊| 色综合一个色综合亚洲| 97久久超碰国产精品| 成人动漫中文字幕| 91香蕉视频mp4| 在线视频中文字幕一区二区| 欧美专区日韩专区| 欧美久久久久久久久久| 日韩一区二区高清| 欧美mv日韩mv| 久久久久99精品一区| 亚洲国产高清在线| 亚洲色图制服丝袜| 亚洲国产日韩综合久久精品| 亚洲电影激情视频网站| 丝袜亚洲另类丝袜在线| 久久99精品国产麻豆婷婷洗澡| 蜜臀av亚洲一区中文字幕| 激情六月婷婷久久| 成人影视亚洲图片在线| 91色porny在线视频| 91国偷自产一区二区使用方法| 欧美自拍丝袜亚洲| 日韩亚洲欧美综合| 久久久91精品国产一区二区三区| 国产亚洲精品免费| 亚洲婷婷在线视频| 丝袜美腿亚洲综合| 国产一区二区精品久久99| 丁香亚洲综合激情啪啪综合| 91麻豆免费看| 欧美一区二区三区爱爱| 日本一区二区三区高清不卡| 亚洲欧美偷拍卡通变态| 三级久久三级久久久| 国产精品影音先锋| 色妹子一区二区| 日韩女同互慰一区二区| 国产精品久久综合| 亚洲综合视频在线| 久久97超碰色| 99国产精品久久久久| 91精品视频网| 亚洲国产精品激情在线观看| 亚洲国产精品久久久久婷婷884| 精品亚洲成a人在线观看| av毛片久久久久**hd| 91精品国产福利在线观看| 日本一区二区三区在线观看| 视频精品一区二区| www.亚洲精品| 欧美成人高清电影在线| 亚洲乱码国产乱码精品精98午夜| 麻豆91精品91久久久的内涵| 色综合色综合色综合| 国产精品三级av在线播放| 亚洲成av人片在线| 粉嫩蜜臀av国产精品网站| 欧美日韩成人综合| 中文字幕一区日韩精品欧美| 日韩和欧美的一区| 91一区二区在线观看| 久久亚洲精华国产精华液| 亚洲一区电影777| 成人性色生活片| 日韩无一区二区| 亚洲自拍与偷拍| 成人黄色a**站在线观看| 91精品国产综合久久精品性色 | 免费成人av在线播放| 色综合一个色综合亚洲| 国产日韩欧美a| 久久疯狂做爰流白浆xx| 欧美人妖巨大在线| 一二三四区精品视频| k8久久久一区二区三区| 亚洲精品一区二区三区精华液 | 国产精品久久久久影视| 久久国产精品色| 在线成人高清不卡| 亚洲激情成人在线| 91视频国产资源| 国产精品三级久久久久三级| 国产精品一区三区| 日韩欧美三级在线| 人人狠狠综合久久亚洲| 欧美色网一区二区| 亚洲精品成人精品456| 99精品久久99久久久久| 中文在线一区二区| 成人亚洲一区二区一| 久久久久久久久久久久电影| 美女在线视频一区| 日韩一区二区三区四区 | 97国产一区二区| 中文字幕av一区二区三区高| 国产高清不卡一区二区| 久久九九久久九九| 国产精品一品视频| 国产欧美一区二区在线观看| 国产毛片精品一区| wwwwxxxxx欧美| 国产伦精品一区二区三区在线观看| 久久先锋影音av鲁色资源网| 精品一区二区三区欧美| 精品国产第一区二区三区观看体验| 麻豆91在线观看| 国产午夜精品美女毛片视频| 高清不卡一区二区| 中文字幕五月欧美| 日本高清不卡在线观看| 亚洲国产欧美在线人成| 欧美日韩高清影院| 美女性感视频久久| 久久男人中文字幕资源站| 国产盗摄一区二区| 亚洲欧美激情小说另类| 欧美视频在线一区| 喷白浆一区二区| 久久久久高清精品| 91老师片黄在线观看| 亚洲第一主播视频| 欧美精品一区二区三| 成人精品视频一区二区三区尤物| 综合av第一页| 欧美视频中文一区二区三区在线观看 | 亚洲一区二区视频在线观看| 国产成人av网站| 秋霞av亚洲一区二区三| 午夜久久福利影院| 欧美一区二区三区免费| 日韩情涩欧美日韩视频| 色婷婷综合久久| 色婷婷综合久久久中文字幕| 色8久久人人97超碰香蕉987| 国产成人精品一区二| 青青草成人在线观看| 亚洲欧美另类图片小说| 中文字幕日韩一区二区| 国精产品一区一区三区mba桃花| 在线观看一区二区视频| 免费日本视频一区| 国产精品欧美久久久久无广告 | 亚洲欧美日韩电影| 69av一区二区三区| 成人激情免费网站| 日韩专区欧美专区| 国产精品美女www爽爽爽| 欧美人妇做爰xxxⅹ性高电影| 精品在线免费观看| 亚洲靠逼com| 欧美精品一区二区久久久| 欧美在线一区二区| 国产69精品久久777的优势| 一二三四社区欧美黄| 国产日产欧美精品一区二区三区| 欧美午夜不卡在线观看免费| 国产精品99久久久久久宅男| 三级在线观看一区二区| 亚洲人成伊人成综合网小说| 日韩精品资源二区在线| 一本大道久久a久久精二百| 久久精品国产久精国产| 夜夜嗨av一区二区三区网页| 国产日产亚洲精品系列| 日韩美女一区二区三区四区| 91麻豆蜜桃一区二区三区| 国产成人在线免费观看| 日韩国产成人精品| 日韩久久一区二区| 国产清纯白嫩初高生在线观看91| 日韩一区二区在线观看视频| 欧美视频一区在线观看| www.久久久久久久久| 国产成人av影院| 99久久综合国产精品| 国产原创一区二区| 奇米在线7777在线精品| 亚洲一区二区三区在线播放| 国产精品的网站| 国产日韩欧美在线一区| 久久久午夜精品| 精品国产1区二区| 欧美一区二区美女| 欧美日韩中文字幕精品| 色偷偷成人一区二区三区91 | 99久久er热在这里只有精品66| 狠狠色狠狠色综合| 久久精品国产在热久久| 亚洲国产欧美一区二区三区丁香婷| 亚洲色图清纯唯美| 日韩码欧中文字| 中文字幕佐山爱一区二区免费| 亚洲国产精品国自产拍av| 国产视频一区不卡|