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

📄 os_flag.lst

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


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

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/OS-II
   4          *                                          The Real-Time Kernel
   5          *                                         EVENT FLAG  MANAGEMENT
   6          *
   7          *                          (c) Copyright 2001-2005, Jean J. Labrosse, Weston, FL
   8          *                                           All Rights Reserved
   9          *
  10          * File    : OS_FLAG.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_FLAG                                                               08/04/2008 21:49:51 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_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
  21          /*
  22          *********************************************************************************************************
  23          *                                            LOCAL PROTOTYPES
  24          *********************************************************************************************************
  25          */
  26          
  27          static  void     OS_FlagBlock(OS_FLAG_GRP *pgrp, OS_FLAG_NODE *pnode, OS_FLAGS flags, INT8U wait_type, INT
             -16U timeout);
  28          static  BOOLEAN  OS_FlagTaskRdy(OS_FLAG_NODE *pnode, OS_FLAGS flags_rdy);
  29          
  30          /*$PAGE*/
  31          /*
  32          *********************************************************************************************************
  33          *                              CHECK THE STATUS OF FLAGS IN AN EVENT FLAG GROUP
  34          *
  35          * Description: This function is called to check the status of a combination of bits to be set or cleared
  36          *              in an event flag group.  Your application can check for ANY bit to be set/cleared or ALL
  37          *              bits to be set/cleared.
  38          *
  39          *              This call does not block if the desired flags are not present.
  40          *
  41          * Arguments  : pgrp          is a pointer to the desired event flag group.
  42          *
  43          *              flags         Is a bit pattern indicating which bit(s) (i.e. flags) you wish to check.
  44          *                            The bits you want are specified by setting the corresponding bits in
  45          *                            'flags'.  e.g. if your application wants to wait for bits 0 and 1 then
  46          *                            'flags' would contain 0x03.
  47          *
  48          *              wait_type     specifies whether you want ALL bits to be set/cleared or ANY of the bits
  49          *                            to be set/cleared.
  50          *                            You can specify the following argument:
  51          *
  52          *                            OS_FLAG_WAIT_CLR_ALL   You will check ALL bits in 'flags' to be clear (0)
  53          *                            OS_FLAG_WAIT_CLR_ANY   You will check ANY bit  in 'flags' to be clear (0)
  54          *                            OS_FLAG_WAIT_SET_ALL   You will check ALL bits in 'flags' to be set   (1)
  55          *                            OS_FLAG_WAIT_SET_ANY   You will check ANY bit  in 'flags' to be set   (1)
  56          *
  57          *                            NOTE: Add OS_FLAG_CONSUME if you want the event flag to be 'consumed' by
  58          *                                  the call.  Example, to wait for any flag in a group AND then clear
C51 COMPILER V8.08   OS_FLAG                                                               08/04/2008 21:49:51 PAGE 3   

  59          *                                  the flags that are present, set 'wait_type' to:
  60          *
  61          *                                  OS_FLAG_WAIT_SET_ANY + OS_FLAG_CONSUME
  62          *
  63          *              err           is a pointer to an error code and can be:
  64          *                            OS_NO_ERR              No error
  65          *                            OS_ERR_EVENT_TYPE      You are not pointing to an event flag group
  66          *                            OS_FLAG_ERR_WAIT_TYPE  You didn't specify a proper 'wait_type' argument.
  67          *                            OS_FLAG_INVALID_PGRP   You passed a NULL pointer instead of the event flag
  68          *                                                   group handle.
  69          *                            OS_FLAG_ERR_NOT_RDY    The desired flags you are waiting for are not
  70          *                                                   available.
  71          *
  72          * Returns    : The flags in the event flag group that made the task ready or, 0 if a timeout or an error
  73          *              occurred.
  74          *
  75          * Called from: Task or ISR
  76          *
  77          * Note(s)    : 1) IMPORTANT, the behavior of this function has changed from PREVIOUS versions.  The
  78          *                 function NOW returns the flags that were ready INSTEAD of the current state of the
  79          *                 event flags.
  80          *********************************************************************************************************
  81          */
  82          
  83          #if OS_FLAG_ACCEPT_EN > 0
  84          OS_FLAGS  OSFlagAccept (OS_FLAG_GRP *pgrp, OS_FLAGS flags, INT8U wait_type, INT8U *err)
  85          {
  86              OS_FLAGS      flags_rdy;
  87              INT8U         result;
  88              BOOLEAN       consume;
  89          #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
                  OS_CPU_SR     cpu_sr = 0;
              #endif
  92          
  93          
  94          
  95          #if OS_ARG_CHK_EN > 0
  96              if (err == (INT8U *)0) {                               /* Validate 'err'                           */
  97                  return ((OS_FLAGS)0);
  98              }
  99              if (pgrp == (OS_FLAG_GRP *)0) {                        /* Validate 'pgrp'                          */
 100                  *err = OS_FLAG_INVALID_PGRP;
 101                  return ((OS_FLAGS)0);
 102              }
 103          #endif
 104              if (pgrp->OSFlagType != OS_EVENT_TYPE_FLAG) {          /* Validate event block type                */
 105                  *err = OS_ERR_EVENT_TYPE;
 106                  return ((OS_FLAGS)0);
 107              }
 108              result = wait_type & OS_FLAG_CONSUME;
 109              if (result != (INT8U)0) {                              /* See if we need to consume the flags      */
 110                  wait_type &= ~OS_FLAG_CONSUME;
 111                  consume    = TRUE;
 112              } else {
 113                  consume    = FALSE;
 114              }
 115          /*$PAGE*/
 116              *err = OS_NO_ERR;                                      /* Assume NO error until proven otherwise.  */
 117              OS_ENTER_CRITICAL();
 118              switch (wait_type) {
 119                  case OS_FLAG_WAIT_SET_ALL:                         /* See if all required flags are set        */
 120                       flags_rdy = pgrp->OSFlagFlags & flags;        /* Extract only the bits we want            */
C51 COMPILER V8.08   OS_FLAG                                                               08/04/2008 21:49:51 PAGE 4   

 121                       if (flags_rdy == flags) {                     /* Must match ALL the bits that we want     */
 122                           if (consume == TRUE) {                    /* See if we need to consume the flags      */
 123                               pgrp->OSFlagFlags &= ~flags_rdy;      /* Clear ONLY the flags that we wanted      */
 124                           }
 125                       } else {
 126                           *err  = OS_FLAG_ERR_NOT_RDY;
 127                       }
 128                       OS_EXIT_CRITICAL();
 129                       break;
 130          
 131                  case OS_FLAG_WAIT_SET_ANY:
 132                       flags_rdy = pgrp->OSFlagFlags & flags;        /* Extract only the bits we want            */
 133                       if (flags_rdy != (OS_FLAGS)0) {               /* See if any flag set                      */

⌨️ 快捷键说明

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