⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_mbox.lst

📁 在51上运行的小的OS系统
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V8.08   OS_MBOX                                                               08/04/2008 21:49:52 PAGE 1   


C51 COMPILER V8.08, COMPILATION OF MODULE OS_MBOX
OBJECT MODULE PLACED IN OS_MBOX.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE uCosii\OS_MBOX.C DEBUG OBJECTEXTEND PRINT(.\OS_MBOX.lst) OBJECT(OS_MBOX.obj
                    -)

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/OS-II
   4          *                                          The Real-Time Kernel
   5          *                                       MESSAGE MAILBOX MANAGEMENT
   6          *
   7          *                          (c) Copyright 1992-2005, Jean J. Labrosse, Weston, FL
   8          *                                           All Rights Reserved
   9          *
  10          * File    : OS_MBOX.C
  11          * By      : Jean J. Labrosse
  12          * Version : V2.80
  13          *********************************************************************************************************
  14          */
  15          
  16          #ifndef  OS_MASTER_FILE
  17          #include "..\arm\includes.h"
*** ERROR C141 IN LINE 83 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x00'
*** ERROR C132 IN LINE 83 OF UCOSII\..\ARM\OS_CPU.H: 'OS_TASK_SW': not in formal parameter list
*** ERROR C141 IN LINE 84 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x01'
*** ERROR C132 IN LINE 84 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 84 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 84 OF UCOSII\..\ARM\OS_CPU.H: '_OSStartHighRdy': not in formal parameter list
*** ERROR C141 IN LINE 85 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x02'
*** ERROR C132 IN LINE 85 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 85 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 85 OF UCOSII\..\ARM\OS_CPU.H: 'OS_ENTER_CRITICAL': not in formal parameter list
*** ERROR C141 IN LINE 86 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x03'
*** ERROR C132 IN LINE 86 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 86 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 86 OF UCOSII\..\ARM\OS_CPU.H: 'OS_EXIT_CRITICAL': not in formal parameter list
*** ERROR C141 IN LINE 88 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x40'
*** ERROR C132 IN LINE 88 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 88 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 88 OF UCOSII\..\ARM\OS_CPU.H: '_GetOSFunctionAddr': not in formal parameter list
*** ERROR C141 IN LINE 89 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x41'
*** ERROR C132 IN LINE 89 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 89 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 89 OF UCOSII\..\ARM\OS_CPU.H: '_GetUsrFunctionAddr': not in formal parameter list
*** ERROR C141 IN LINE 90 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x42'
*** ERROR C132 IN LINE 90 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 90 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 90 OF UCOSII\..\ARM\OS_CPU.H: 'OSISRBegin': not in formal parameter list
*** ERROR C141 IN LINE 91 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x43'
*** ERROR C132 IN LINE 91 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 91 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'int'
*** ERROR C132 IN LINE 91 OF UCOSII\..\ARM\OS_CPU.H: 'OSISRNeedSwap': not in formal parameter list
*** ERROR C141 IN LINE 93 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x80'
*** ERROR C132 IN LINE 93 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 93 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 93 OF UCOSII\..\ARM\OS_CPU.H: 'ChangeToSYSMode': not in formal parameter list
*** ERROR C141 IN LINE 94 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x81'
*** ERROR C132 IN LINE 94 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 94 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
C51 COMPILER V8.08   OS_MBOX                                                               08/04/2008 21:49:52 PAGE 2   

*** ERROR C132 IN LINE 94 OF UCOSII\..\ARM\OS_CPU.H: 'ChangeToUSRMode': not in formal parameter list
*** ERROR C141 IN LINE 95 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x82'
*** ERROR C132 IN LINE 95 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 95 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 95 OF UCOSII\..\ARM\OS_CPU.H: '_TaskIsARM': not in formal parameter list
*** ERROR C141 IN LINE 96 OF UCOSII\..\ARM\OS_CPU.H: syntax error near '0x83'
*** ERROR C132 IN LINE 96 OF UCOSII\..\ARM\OS_CPU.H: '__swi': not in formal parameter list
*** ERROR C141 IN LINE 96 OF UCOSII\..\ARM\OS_CPU.H: syntax error near 'void'
*** ERROR C132 IN LINE 96 OF UCOSII\..\ARM\OS_CPU.H: '_TaskIsTHUMB': not in formal parameter list
*** ERROR C127 IN LINE 113 OF UCOSII\..\ARM\OS_CPU.H: 'OsEnterSum': invalid storage class
*** ERROR C127 IN LINE 284 OF UCOSII\..\UCOSII\UCOS_II.H: 'OS_EVENT': invalid storage class
*** ERROR C127 IN LINE 301 OF UCOSII\..\UCOSII\UCOS_II.H: 'OS_FLAGS': invalid storage class
*** ERROR C141 IN LINE 312 OF UCOSII\..\UCOSII\UCOS_II.H: syntax error near 'OS_FLAGS'
*** ERROR C127 IN LINE 312 OF UCOSII\..\UCOSII\UCOS_II.H: 'OS_FLAGS': invalid storage class
*** ERROR C141 IN LINE 312 OF UCOSII\..\UCOSII\UCOS_II.H: syntax error near 'OSFlagFlags'
*** ERROR C127 IN LINE 312 OF UCOSII\..\UCOSII\UCOS_II.H: 'OSFlagFlags': invalid storage class
*** ERROR C132 IN LINE 314 OF UCOSII\..\UCOSII\UCOS_II.H: 'OSFlagName': not in formal parameter list
*** ERROR C141 IN LINE 316 OF UCOSII\..\UCOSII\UCOS_II.H: syntax error near '}'
*** ERROR C141 IN LINE 325 OF UCOSII\..\UCOSII\UCOS_II.H: syntax error near 'OS_FLAGS'
*** ERROR C129 IN LINE 325 OF UCOSII\..\UCOSII\UCOS_II.H: missing ';' before 'OSFlagNodeFlags'
  18          #endif
  19          
  20          #if OS_MBOX_EN > 0
  21          /*
  22          *********************************************************************************************************
  23          *                                     ACCEPT MESSAGE FROM MAILBOX
  24          *
  25          * Description: This function checks the mailbox to see if a message is available.  Unlike OSMboxPend(),
  26          *              OSMboxAccept() does not suspend the calling task if a message is not available.
  27          *
  28          * Arguments  : pevent        is a pointer to the event control block
  29          *
  30          * Returns    : != (void *)0  is the message in the mailbox if one is available.  The mailbox is cleared
  31          *                            so the next time OSMboxAccept() is called, the mailbox will be empty.
  32          *              == (void *)0  if the mailbox is empty or,
  33          *                            if 'pevent' is a NULL pointer or,
  34          *                            if you didn't pass the proper event pointer.
  35          *********************************************************************************************************
  36          */
  37          
  38          #if OS_MBOX_ACCEPT_EN > 0
  39          void  *OSMboxAccept (OS_EVENT *pevent)
  40          {
  41              void      *msg;
  42          #if OS_CRITICAL_METHOD == 3                               /* Allocate storage for CPU status register  */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
  45          
  46          
  47          
  48          #if OS_ARG_CHK_EN > 0
  49              if (pevent == (OS_EVENT *)0) {                        /* Validate 'pevent'                         */
  50                  return ((void *)0);
  51              }
  52          #endif
  53              if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {      /* Validate event block type                 */
  54                  return ((void *)0);
  55              }
  56              OS_ENTER_CRITICAL();
  57              msg                = pevent->OSEventPtr;
  58              pevent->OSEventPtr = (void *)0;                       /* Clear the mailbox                         */
  59              OS_EXIT_CRITICAL();
C51 COMPILER V8.08   OS_MBOX                                                               08/04/2008 21:49:52 PAGE 3   

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

 122          *                            opt == OS_DEL_ALWAYS    Deletes the mailbox even if tasks are waiting.
 123          *                                                    In this case, all the tasks pending will be readied.
 124          *
 125          *              err           is a pointer to an error code that can contain one of the following values:
 126          *                            OS_NO_ERR               The call was successful and the mailbox was deleted
 127          *                            OS_ERR_DEL_ISR          If you attempted to delete the mailbox from an ISR

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -