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

📄 os_mbox.lst

📁 ARM仿真案例
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   00000054   ........           _BLF     OS_Sched,??OS_Sched??rT
    418                  return (OS_NO_ERR);
   \   00000058   0BE0               B.N      ??OSMboxPostOpt_8
    419              }
    420              if (pevent->OSEventPtr != (void *)0) {            /* Make sure mailbox doesn't already have a msg  */
   \                     ??OSMboxPostOpt_4:
   \   0000005A   6068               LDR      R0,[R4, #+4]
   \   0000005C   0028               CMP      R0,#+0
   \   0000005E   04D0               BEQ      ??OSMboxPostOpt_9
    421                  OS_EXIT_CRITICAL();
   \   00000060   3800               MOVS     R0,R7
   \   00000062   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
    422                  return (OS_MBOX_FULL);
   \   00000066   1420               MOVS     R0,#+20
   \   00000068   04E0               B        ??OSMboxPostOpt_1
    423              }
    424              pevent->OSEventPtr = msg;                         /* Place message in mailbox                      */
   \                     ??OSMboxPostOpt_9:
   \   0000006A   6560               STR      R5,[R4, #+4]
    425              OS_EXIT_CRITICAL();
   \   0000006C   3800               MOVS     R0,R7
   \   0000006E   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
    426              return (OS_NO_ERR);
   \                     ??OSMboxPostOpt_8:
   \   00000072   0020               MOVS     R0,#+0
   \                     ??OSMboxPostOpt_1:
   \   00000074   F0BC               POP      {R4-R7}
   \   00000076   02BC               POP      {R1}
   \   00000078   0847               BX       R1               ;; return
    427          }
    428          #endif
    429          
    430          
    431          /*
    432          *********************************************************************************************************
    433          *                                        QUERY A MESSAGE MAILBOX
    434          *
    435          * Description: This function obtains information about a message mailbox.
    436          *
    437          * Arguments  : pevent        is a pointer to the event control block associated with the desired mailbox
    438          *
    439          *              p_mbox_data   is a pointer to a structure that will contain information about the message
    440          *                            mailbox.
    441          *
    442          * Returns    : OS_NO_ERR           The call was successful and the message was sent
    443          *              OS_ERR_EVENT_TYPE   If you are attempting to obtain data from a non mailbox.
    444          *              OS_ERR_PEVENT_NULL  If 'pevent' is a NULL pointer
    445          *********************************************************************************************************
    446          */
    447          
    448          #if OS_MBOX_QUERY_EN > 0

   \                                 In segment CODE, align 4, keep-with-next
    449          INT8U  OSMboxQuery (OS_EVENT *pevent, OS_MBOX_DATA *p_mbox_data)
    450          {
   \                     OSMboxQuery:
   \   00000000   30B5               PUSH     {R4,R5,LR}
   \   00000002   0400               MOVS     R4,R0
   \   00000004   0D00               MOVS     R5,R1
    451          #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    452              OS_CPU_SR  cpu_sr;
    453          #endif    
    454              INT8U     *psrc;
    455              INT8U     *pdest;
    456          
    457          
    458          #if OS_ARG_CHK_EN > 0
    459              if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */
   \   00000006   002C               CMP      R4,#+0
   \   00000008   01D1               BNE      ??OSMboxQuery_0
    460                  return (OS_ERR_PEVENT_NULL);
   \   0000000A   0420               MOVS     R0,#+4
   \   0000000C   21E0               B        ??OSMboxQuery_1
    461              }
    462          #endif
    463              if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {       /* Validate event block type                */
   \                     ??OSMboxQuery_0:
   \   0000000E   2078               LDRB     R0,[R4, #+0]
   \   00000010   0128               CMP      R0,#+1
   \   00000012   01D0               BEQ      ??OSMboxQuery_2
    464                  return (OS_ERR_EVENT_TYPE);
   \   00000014   0120               MOVS     R0,#+1
   \   00000016   1CE0               B        ??OSMboxQuery_1
    465              }
    466              OS_ENTER_CRITICAL();
   \                     ??OSMboxQuery_2:
   \   00000018   ........           _BLF     OS_CPU_SR_Save,??OS_CPU_SR_Save??rT
    467              p_mbox_data->OSEventGrp = pevent->OSEventGrp;          /* Copy message mailbox wait list           */
   \   0000001C   6178               LDRB     R1,[R4, #+1]
   \   0000001E   2973               STRB     R1,[R5, #+12]
    468              psrc                    = &pevent->OSEventTbl[0];
   \   00000020   2100               MOVS     R1,R4
    469              pdest                   = &p_mbox_data->OSEventTbl[0];
   \   00000022   2A1D               ADDS     R2,R5,#+4
    470          
    471          #if OS_EVENT_TBL_SIZE > 0
    472              *pdest++ = *psrc++;
   \   00000024   0B7A               LDRB     R3,[R1, #+8]
   \   00000026   1370               STRB     R3,[R2, #+0]
    473          #endif
    474          
    475          #if OS_EVENT_TBL_SIZE > 1
    476              *pdest++ = *psrc++;
   \   00000028   4B7A               LDRB     R3,[R1, #+9]
   \   0000002A   5370               STRB     R3,[R2, #+1]
    477          #endif
    478          
    479          #if OS_EVENT_TBL_SIZE > 2
    480              *pdest++ = *psrc++;
   \   0000002C   8B7A               LDRB     R3,[R1, #+10]
   \   0000002E   9370               STRB     R3,[R2, #+2]
    481          #endif
    482          
    483          #if OS_EVENT_TBL_SIZE > 3
    484              *pdest++ = *psrc++;
   \   00000030   CB7A               LDRB     R3,[R1, #+11]
   \   00000032   D370               STRB     R3,[R2, #+3]
    485          #endif
    486          
    487          #if OS_EVENT_TBL_SIZE > 4
    488              *pdest++ = *psrc++;
   \   00000034   0B7B               LDRB     R3,[R1, #+12]
   \   00000036   1371               STRB     R3,[R2, #+4]
    489          #endif
    490          
    491          #if OS_EVENT_TBL_SIZE > 5
    492              *pdest++ = *psrc++;
   \   00000038   4B7B               LDRB     R3,[R1, #+13]
   \   0000003A   5371               STRB     R3,[R2, #+5]
   \   0000003C   0E31               ADDS     R1,R1,#+14
   \   0000003E   921D               ADDS     R2,R2,#+6
    493          #endif
    494          
    495          #if OS_EVENT_TBL_SIZE > 6
    496              *pdest++ = *psrc++;
   \   00000040   0B78               LDRB     R3,[R1, #+0]
   \   00000042   1370               STRB     R3,[R2, #+0]
    497          #endif
    498          
    499          #if OS_EVENT_TBL_SIZE > 7
    500              *pdest   = *psrc;
   \   00000044   4978               LDRB     R1,[R1, #+1]
   \   00000046   5170               STRB     R1,[R2, #+1]
    501          #endif
    502              p_mbox_data->OSMsg = pevent->OSEventPtr;               /* Get message from mailbox                 */
   \   00000048   6168               LDR      R1,[R4, #+4]
   \   0000004A   2960               STR      R1,[R5, #+0]
    503              OS_EXIT_CRITICAL();
   \   0000004C   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
    504              return (OS_NO_ERR);
   \   00000050   0020               MOVS     R0,#+0
   \                     ??OSMboxQuery_1:
   \   00000052   30BC               POP      {R4,R5}
   \   00000054   02BC               POP      {R1}
   \   00000056   0847               BX       R1               ;; return
    505          }

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable6:
   \   00000000   ........           DC32     OSEventFreeList

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable7:
   \   00000000   ........           DC32     OSIntNesting
    506          #endif                                                     /* OS_MBOX_QUERY_EN                         */
    507          #endif                                                     /* OS_MBOX_EN                               */

   Maximum stack usage in bytes:

     Function      CSTACK
     --------      ------
     OSMboxAccept     12
     OSMboxCreate     12
     OSMboxDel        24
     OSMboxPend       24
     OSMboxPost       16
     OSMboxPostOpt    20
     OSMboxQuery      12


   Segment part sizes:

     Function/Label Bytes
     -------------- -----
     OSMboxAccept     38
     OSMboxCreate     72
     OSMboxDel       198
     OSMboxPend      184
     OSMboxPost       98
     OSMboxPostOpt   122
     OSMboxQuery      88
     ??DataTable6      4
     ??DataTable7      4
      Others         112

 
 920 bytes in segment CODE
 
 808 bytes of CODE memory (+ 112 bytes shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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