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

📄 os_q.lst

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


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

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/OS-II
   4          *                                          The Real-Time Kernel
   5          *                                        MESSAGE QUEUE MANAGEMENT
   6          *
   7          *                          (c) Copyright 1992-2005, Jean J. Labrosse, Weston, FL
   8          *                                           All Rights Reserved
   9          *
  10          * File    : OS_Q.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'
*** ERROR C132 IN LINE 94 OF UCOSII\..\ARM\OS_CPU.H: 'ChangeToUSRMode': not in formal parameter list
C51 COMPILER V8.08   OS_Q                                                                  08/04/2008 21:49:52 PAGE 2   

*** 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_Q_EN > 0) && (OS_MAX_QS > 0)
  21          /*
  22          *********************************************************************************************************
  23          *                                      ACCEPT MESSAGE FROM QUEUE
  24          *
  25          * Description: This function checks the queue to see if a message is available.  Unlike OSQPend(),
  26          *              OSQAccept() 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          *              err           is a pointer to where an error message will be deposited.  Possible error
  31          *                            messages are:
  32          *
  33          *                            OS_NO_ERR           The call was successful and your task received a
  34          *                                                message.
  35          *                            OS_ERR_EVENT_TYPE   You didn't pass a pointer to a queue
  36          *                            OS_ERR_PEVENT_NULL  If 'pevent' is a NULL pointer
  37          *                            OS_Q_EMPTY          The queue did not contain any messages
  38          *
  39          * Returns    : != (void *)0  is the message in the queue if one is available.  The message is removed
  40          *                            from the so the next time OSQAccept() is called, the queue will contain
  41          *                            one less entry.
  42          *              == (void *)0  if you received a NULL pointer message
  43          *                            if the queue is empty or,
  44          *                            if 'pevent' is a NULL pointer or,
  45          *                            if you passed an invalid event type
  46          *
  47          * Note(s)    : As of V2.60, you can now pass NULL pointers through queues.  Because of this, the argument
  48          *              'err' has been added to the API to tell you about the outcome of the call.
  49          *********************************************************************************************************
  50          */
  51          
  52          #if OS_Q_ACCEPT_EN > 0
  53          void  *OSQAccept (OS_EVENT *pevent, INT8U *err)
  54          {
  55              void      *msg;
  56              OS_Q      *pq;
  57          #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
  60          
C51 COMPILER V8.08   OS_Q                                                                  08/04/2008 21:49:52 PAGE 3   

  61          
  62          
  63          #if OS_ARG_CHK_EN > 0
  64              if (err == (INT8U *)0) {                     /* Validate 'err'                                     */
  65                  return ((void *)0);
  66              }
  67              if (pevent == (OS_EVENT *)0) {               /* Validate 'pevent'                                  */
  68                  *err = OS_ERR_PEVENT_NULL;
  69                  return ((void *)0);
  70              }
  71          #endif
  72              if (pevent->OSEventType != OS_EVENT_TYPE_Q) {/* Validate event block type                          */
  73                  *err = OS_ERR_EVENT_TYPE;
  74                  return ((void *)0);
  75              }
  76              OS_ENTER_CRITICAL();
  77              pq = (OS_Q *)pevent->OSEventPtr;             /* Point at queue control block                       */
  78              if (pq->OSQEntries > 0) {                    /* See if any messages in the queue                   */
  79                  msg = *pq->OSQOut++;                     /* Yes, extract oldest message from the queue         */
  80                  pq->OSQEntries--;                        /* Update the number of entries in the queue          */
  81                  if (pq->OSQOut == pq->OSQEnd) {          /* Wrap OUT pointer if we are at the end of the queue */
  82                      pq->OSQOut = pq->OSQStart;
  83                  }
  84                  *err = OS_NO_ERR;
  85              } else {
  86                  *err = OS_Q_EMPTY;
  87                  msg  = (void *)0;                        /* Queue is empty                                     */
  88              }
  89              OS_EXIT_CRITICAL();
  90              return (msg);                                /* Return message received (or NULL)                  */
  91          }
  92          #endif
  93          /*$PAGE*/
  94          /*
  95          *********************************************************************************************************
  96          *                                        CREATE A MESSAGE QUEUE
  97          *
  98          * Description: This function creates a message queue if free event control blocks are available.
  99          *
 100          * Arguments  : start         is a pointer to the base address of the message queue storage area.  The
 101          *                            storage area MUST be declared as an array of pointers to 'void' as follows
 102          *
 103          *                            void *MessageStorage[size]
 104          *
 105          *              size          is the number of elements in the storage area
 106          *
 107          * Returns    : != (OS_EVENT *)0  is a pointer to the event control clock (OS_EVENT) associated with the
 108          *                                created queue
 109          *              == (OS_EVENT *)0  if no event control blocks were available or an error was detected
 110          *********************************************************************************************************
 111          */
 112          
 113          OS_EVENT  *OSQCreate (void **start, INT16U size)
 114          {
 115              OS_EVENT  *pevent;
 116              OS_Q      *pq;
 117          #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
 120          
 121          
 122          
C51 COMPILER V8.08   OS_Q                                                                  08/04/2008 21:49:52 PAGE 4   

 123              if (OSIntNesting > 0) {                      /* See if called from ISR ...                         */
 124                  return ((OS_EVENT *)0);                  /* ... can't CREATE from an ISR                       */
 125              }
 126              OS_ENTER_CRITICAL();
 127              pevent = OSEventFreeList;                    /* Get next free event control block                  */
 128              if (OSEventFreeList != (OS_EVENT *)0) {      /* See if pool of free ECB pool was empty             */
 129                  OSEventFreeList = (OS_EVENT *)OSEventFreeList->OSEventPtr;
 130              }
 131              OS_EXIT_CRITICAL();
 132              if (pevent != (OS_EVENT *)0) {               /* See if we have an event control block              */
 133                  OS_ENTER_CRITICAL();
 134                  pq = OSQFreeList;                        /* Get a free queue control block                     */
 135                  if (pq != (OS_Q *)0) {                   /* Were we able to get a queue control block ?        */
 136                      OSQFreeList            = OSQFreeList->OSQPtr; /* Yes, Adjust free list pointer to next free*/
 137                      OS_EXIT_CRITICAL();
 138                      pq->OSQStart           = start;               /*      Initialize the queue                 */
 139                      pq->OSQEnd             = &start[size];
 140                      pq->OSQIn              = start;
 141                      pq->OSQOut             = start;
 142                      pq->OSQSize            = size;
 143                      pq->OSQEntries         = 0;

⌨️ 快捷键说明

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