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

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

?? os_mbox.lst

?? 該源碼是本人經調試通過的UCOS2操作系統在51單片機上移植好的源代碼
?? LST
?? 第 1 頁 / 共 3 頁
字號:
C51 COMPILER V7.20   OS_MBOX                                                               06/15/2006 16:15:50 PAGE 1   


C51 COMPILER V7.20, COMPILATION OF MODULE OS_MBOX
OBJECT MODULE PLACED IN OS_MBOX.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE OS_MBOX.C LARGE BROWSE DEBUG OBJECTEXTEND

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/OS-II
   4          *                                          The Real-Time Kernel
   5          *                                       MESSAGE MAILBOX MANAGEMENT
   6          *
   7          *                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
   8          *                                           All Rights Reserved
   9          *
  10          * File : OS_MBOX.C
  11          * By   : Jean J. Labrosse
  12          *********************************************************************************************************
  13          */
  14          
  15          #ifndef  OS_MASTER_FILE
  16          #include "ucos_ii.h"
  17          #endif
  18          
  19          #if OS_MBOX_EN > 0
  20          /*
  21          *********************************************************************************************************
  22          *                                     ACCEPT MESSAGE FROM MAILBOX
  23          *
  24          * Description: This function checks the mailbox to see if a message is available.  Unlike OSMboxPend(),
  25          *              OSMboxAccept() does not suspend the calling task if a message is not available.
  26          *
  27          * Arguments  : pevent        is a pointer to the event control block
  28          *
  29          * Returns    : != (void *)0  is the message in the mailbox if one is available.  The mailbox is cleared
  30          *                            so the next time OSMboxAccept() is called, the mailbox will be empty.
  31          *              == (void *)0  if the mailbox is empty or,
  32          *                            if 'pevent' is a NULL pointer or,
  33          *                            if you didn't pass the proper event pointer.
  34          *********************************************************************************************************
  35          */
  36          
  37          #if OS_MBOX_ACCEPT_EN > 0
              void  *OSMboxAccept (OS_EVENT *pevent) reentrant
              {
              #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif    
                  void      *msg;
              
              
              #if OS_ARG_CHK_EN > 0
                  if (pevent == (OS_EVENT *)0) {                        /* Validate 'pevent'                         */
                      return ((void *)0);
                  }
                  if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {      /* Validate event block type                 */
                      return ((void *)0);
                  }
              #endif
                  OS_ENTER_CRITICAL();
                  msg                = pevent->OSEventPtr;
C51 COMPILER V7.20   OS_MBOX                                                               06/15/2006 16:15:50 PAGE 2   

                  pevent->OSEventPtr = (void *)0;                       /* Clear the mailbox                         */
                  OS_EXIT_CRITICAL();
                  return (msg);                                         /* Return the message received (or NULL)     */
              }
              #endif
  61          /*$PAGE*/
  62          /*
  63          *********************************************************************************************************
  64          *                                        CREATE A MESSAGE MAILBOX
  65          *
  66          * Description: This function creates a message mailbox if free event control blocks are available.
  67          *
  68          * Arguments  : msg           is a pointer to a message that you wish to deposit in the mailbox.  If
  69          *                            you set this value to the NULL pointer (i.e. (void *)0) then the mailbox
  70          *                            will be considered empty.
  71          *
  72          * Returns    : != (OS_EVENT *)0  is a pointer to the event control clock (OS_EVENT) associated with the
  73          *                                created mailbox
  74          *              == (OS_EVENT *)0  if no event control blocks were available
  75          *********************************************************************************************************
  76          */
  77          #if OS_MBOX_CREATE_EN>0
  78          OS_EVENT  *OSMboxCreate (void *msg) reentrant
  79          {
  80   1      #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif    
  83   1          OS_EVENT  *pevent;
  84   1      
  85   1      
  86   1          if (OSIntNesting > 0) {                      /* See if called from ISR ...                         */
  87   2              return ((OS_EVENT *)0);                  /* ... can't CREATE from an ISR                       */
  88   2          }
  89   1          OS_ENTER_CRITICAL();
  90   1          pevent = OSEventFreeList;                    /* Get next free event control block                  */
  91   1          if (OSEventFreeList != (OS_EVENT *)0) {      /* See if pool of free ECB pool was empty             */
  92   2              OSEventFreeList = (OS_EVENT *)OSEventFreeList->OSEventPtr;
  93   2          }
  94   1          OS_EXIT_CRITICAL();
  95   1          if (pevent != (OS_EVENT *)0) {
  96   2              pevent->OSEventType = OS_EVENT_TYPE_MBOX;
  97   2              pevent->OSEventCnt  = 0;
  98   2              pevent->OSEventPtr  = msg;               /* Deposit message in event control block             */
  99   2              OS_EventWaitListInit(pevent);
 100   2          }
 101   1          return (pevent);                             /* Return pointer to event control block              */
 102   1      }
 103          #endif
 104          /*$PAGE*/
 105          /*
 106          *********************************************************************************************************
 107          *                                         DELETE A MAIBOX
 108          *
 109          * Description: This function deletes a mailbox and readies all tasks pending on the mailbox.
 110          *
 111          * Arguments  : pevent        is a pointer to the event control block associated with the desired
 112          *                            mailbox.
 113          *
 114          *              opt           determines delete options as follows:
 115          *                            opt == OS_DEL_NO_PEND   Delete the mailbox ONLY if no task pending
 116          *                            opt == OS_DEL_ALWAYS    Deletes the mailbox even if tasks are waiting.
 117          *                                                    In this case, all the tasks pending will be readied.
C51 COMPILER V7.20   OS_MBOX                                                               06/15/2006 16:15:50 PAGE 3   

 118          *
 119          *              err           is a pointer to an error code that can contain one of the following values:
 120          *                            OS_NO_ERR               The call was successful and the mailbox was deleted
 121          *                            OS_ERR_DEL_ISR          If you attempted to delete the mailbox from an ISR
 122          *                            OS_ERR_INVALID_OPT      An invalid option was specified
 123          *                            OS_ERR_TASK_WAITING     One or more tasks were waiting on the mailbox
 124          *                            OS_ERR_EVENT_TYPE       If you didn't pass a pointer to a mailbox
 125          *                            OS_ERR_PEVENT_NULL      If 'pevent' is a NULL pointer.
 126          *
 127          * Returns    : pevent        upon error
 128          *              (OS_EVENT *)0 if the mailbox was successfully deleted.
 129          *
 130          * Note(s)    : 1) This function must be used with care.  Tasks that would normally expect the presence of
 131          *                 the mailbox MUST check the return code of OSMboxPend().
 132          *              2) OSMboxAccept() callers will not know that the intended mailbox has been deleted!
 133          *              3) This call can potentially disable interrupts for a long time.  The interrupt disable
 134          *                 time is directly proportional to the number of tasks waiting on the mailbox.
 135          *              4) Because ALL tasks pending on the mailbox will be readied, you MUST be careful in
 136          *                 applications where the mailbox is used for mutual exclusion because the resource(s)
 137          *                 will no longer be guarded by the mailbox.
 138          *********************************************************************************************************
 139          */
 140          
 141          #if OS_MBOX_DEL_EN > 0
              OS_EVENT  *OSMboxDel (OS_EVENT *pevent, INT8U opt, INT8U *err) reentrant
              {
              #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
                  OS_CPU_SR  cpu_sr;
              #endif    
                  BOOLEAN    tasks_waiting;
              
              
                  if (OSIntNesting > 0) {                                /* See if called from ISR ...               */
                      *err = OS_ERR_DEL_ISR;                             /* ... can't DELETE from an ISR             */
                      return (pevent);
                  }
              #if OS_ARG_CHK_EN > 0
                  if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */
                      *err = OS_ERR_PEVENT_NULL;
                      return (pevent);
                  }
                  if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {       /* Validate event block type                */
                      *err = OS_ERR_EVENT_TYPE;
                      return (pevent);
                  }
              #endif
                  OS_ENTER_CRITICAL();
                  if (pevent->OSEventGrp != 0x00) {                      /* See if any tasks waiting on mailbox      */
                      tasks_waiting = TRUE;                              /* Yes                                      */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品久久人人爱蜜臀| 一本高清dvd不卡在线观看| 久久精品在线免费观看| 国产成人av一区二区| 亚洲免费看黄网站| 欧美成人艳星乳罩| 99v久久综合狠狠综合久久| 视频一区二区不卡| 欧美极品少妇xxxxⅹ高跟鞋| 欧美自拍丝袜亚洲| 国产乱子伦视频一区二区三区 | 精品一区在线看| 国产精品家庭影院| 日韩限制级电影在线观看| 国产91丝袜在线播放九色| 免费成人在线视频观看| 中文字幕在线不卡| 日韩欧美一区二区免费| 91免费看`日韩一区二区| 亚洲国产视频网站| 亚洲三级在线播放| 精品久久国产老人久久综合| 欧美中文字幕一二三区视频| 国产精品一二三四| 久久99精品久久久久久国产越南| 亚洲激情图片小说视频| 久久久www免费人成精品| 欧美性猛交xxxxxxxx| 另类中文字幕网| 国产精品乡下勾搭老头1| 亚洲精品国产一区二区三区四区在线| 久久久久久久久一| 在线综合亚洲欧美在线视频| 欧美揉bbbbb揉bbbbb| 成人午夜精品在线| 久久99国产精品久久99| 亚洲福利电影网| 亚洲乱码中文字幕| 国产日韩高清在线| 精品国产一区久久| 欧美日韩视频在线一区二区| 国产在线精品一区二区三区不卡 | 日日欢夜夜爽一区| 亚洲一区二区三区小说| 中文字幕在线一区| 国产日韩欧美精品在线| 欧美精品在线一区二区三区| 在线观看日韩一区| 91日韩精品一区| 96av麻豆蜜桃一区二区| 成人晚上爱看视频| jlzzjlzz国产精品久久| 国产电影精品久久禁18| 国产资源在线一区| 黑人精品欧美一区二区蜜桃| 国产精品自在欧美一区| 国产美女视频一区| 国产一区二区精品在线观看| 美腿丝袜亚洲综合| 亚洲一区二区三区国产| 日韩成人一区二区| 肉肉av福利一精品导航| 日本美女视频一区二区| 理论电影国产精品| 日产精品久久久久久久性色| 精久久久久久久久久久| 韩国视频一区二区| 国产a视频精品免费观看| 国产盗摄一区二区三区| 色婷婷国产精品| 欧美又粗又大又爽| 欧美精品久久天天躁| 91精品国产综合久久精品app| 欧美精品久久久久久久久老牛影院| 精品国产乱码久久久久久夜甘婷婷 | 精品中文字幕一区二区小辣椒| 奇米一区二区三区| 国产美女一区二区三区| 波多野结衣一区二区三区| 日本道精品一区二区三区| 欧美一区二区久久| 亚洲精品在线三区| 日本一二三四高清不卡| 中文文精品字幕一区二区| 国产精品不卡一区| 中文字幕在线不卡| 日韩高清中文字幕一区| 久久91精品久久久久久秒播| 国产精品一区二区久久不卡| 成人av网站免费| 欧洲精品一区二区三区在线观看| 精品sm捆绑视频| 国产精品超碰97尤物18| 亚洲在线视频网站| 国产精品一区二区在线观看不卡 | wwwwww.欧美系列| 亚洲欧美偷拍另类a∨色屁股| 亚洲国产精品一区二区尤物区| 91久久人澡人人添人人爽欧美| 国产jizzjizz一区二区| xnxx国产精品| 看片的网站亚洲| 91一区二区三区在线播放| 国产精品99久久久久| 欧美日韩久久久| 国产欧美日韩精品一区| 国产乱码字幕精品高清av| 欧美成人三级在线| 九色|91porny| 欧美偷拍一区二区| 国产日韩成人精品| 国产精品69久久久久水密桃| 久久综合久色欧美综合狠狠| 国内国产精品久久| 国产亚洲制服色| 色诱亚洲精品久久久久久| 亚洲福利视频导航| 2023国产精品视频| 91在线一区二区三区| 日韩激情在线观看| 欧美激情一区二区三区全黄| 欧美综合一区二区| 国产精品一区二区三区四区| 亚洲亚洲人成综合网络| 国产日韩欧美麻豆| 不卡一区中文字幕| 国产精品久久久99| 91蜜桃婷婷狠狠久久综合9色| 懂色av一区二区夜夜嗨| 欧美tickling挠脚心丨vk| 亚洲午夜视频在线| 色久优优欧美色久优优| 国产精品拍天天在线| 成人app网站| 国产精品久线观看视频| caoporn国产精品| 中文字幕一区在线观看| 91在线观看视频| 亚洲一区二区综合| 亚洲国产cao| 国产亚洲一区二区三区| 成人免费福利片| 一区二区在线观看免费视频播放| 欧美性猛片aaaaaaa做受| 亚洲午夜激情av| 久久精品一区二区三区不卡| 国产成人高清在线| 激情小说亚洲一区| 亚洲欧美日韩国产另类专区| 精品99一区二区三区| 91精品久久久久久蜜臀| 欧美无人高清视频在线观看| 亚洲精品成人a在线观看| 在线精品视频免费播放| 亚洲国产另类av| 日韩视频在线观看一区二区| 久久精品国产99国产精品| 欧美精品一区二区三区一线天视频| 久久国产婷婷国产香蕉| 国产日韩成人精品| 在线观看一区二区视频| 秋霞电影网一区二区| 久久久久国产免费免费| 色欧美乱欧美15图片| 日日夜夜免费精品| 久久理论电影网| 91在线无精精品入口| 一二三区精品福利视频| 91精品国产综合久久国产大片| 国精产品一区一区三区mba桃花| 国产欧美精品一区| 色视频欧美一区二区三区| 日本不卡中文字幕| 欧美国产激情一区二区三区蜜月| 91老师片黄在线观看| 日本不卡高清视频| 中文字幕免费观看一区| 欧美少妇一区二区| 激情文学综合网| 一区二区三区中文免费| 精品日韩一区二区三区免费视频| 成人午夜又粗又硬又大| 亚洲成人免费视| 欧美国产日本视频| 欧美精品成人一区二区三区四区| 国内精品写真在线观看| 亚洲丝袜另类动漫二区| 日韩免费一区二区三区在线播放| 懂色av一区二区三区蜜臀| 亚洲妇女屁股眼交7| 国产亚洲精品久| 8x福利精品第一导航| 懂色一区二区三区免费观看| 日韩精品五月天| 中文字幕中文乱码欧美一区二区| 欧美一区二区精美| 色综合久久综合网97色综合| 黑人巨大精品欧美黑白配亚洲| 亚洲在线观看免费| 国产精品电影一区二区|