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

📄 os_mbox.lst

📁 lpc2478开发板基于IAR编译器移植ucos实验例程
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   000000E4   2C10D1E5           LDRB     R1,[R1, #+44]
   \   000000E8   021091E3           ORRS     R1,R1,#0x2
   \   000000EC   2C10C0E5           STRB     R1,[R0, #+44]
    314              OSTCBCur->OSTCBStatPend  = OS_STAT_PEND_OK;
   \   000000F0   E8009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   000000F4   000090E5           LDR      R0,[R0, #+0]
   \   000000F8   0010A0E3           MOV      R1,#+0
   \   000000FC   2D10C0E5           STRB     R1,[R0, #+45]
    315              OSTCBCur->OSTCBDly       = timeout;               /* Load timeout in TCB                           */
   \   00000100   D8009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   00000104   000090E5           LDR      R0,[R0, #+0]
   \   00000108   BA52C0E1           STRH     R5,[R0, #+42]
    316              OS_EventTaskWait(pevent);                         /* Suspend task until event or timeout occurs    */
   \   0000010C   0400B0E1           MOVS     R0,R4
   \   00000110   ........           _BLF     OS_EventTaskWait,??OS_EventTaskWait??rA
    317              OS_EXIT_CRITICAL();
   \   00000114   0900B0E1           MOVS     R0,R9
   \   00000118   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rA
    318              OS_Sched();                                       /* Find next highest priority task ready to run  */
   \   0000011C   ........           _BLF     OS_Sched,??OS_Sched??rA
    319              OS_ENTER_CRITICAL();
   \   00000120   ........           _BLF     OS_CPU_SR_Save,??OS_CPU_SR_Save??rA
   \   00000124   0090B0E1           MOVS     R9,R0
    320              if (OSTCBCur->OSTCBStatPend != OS_STAT_PEND_OK) { /* See if we weren't given the message           */
   \   00000128   B0009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   0000012C   000090E5           LDR      R0,[R0, #+0]
   \   00000130   2D00D0E5           LDRB     R0,[R0, #+45]
   \   00000134   000050E3           CMP      R0,#+0
   \   00000138   1100000A           BEQ      ??OSMboxPend_8
    321                  pend_stat = OSTCBCur->OSTCBStatPend;
   \   0000013C   9C009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   00000140   000090E5           LDR      R0,[R0, #+0]
   \   00000144   2D00D0E5           LDRB     R0,[R0, #+45]
   \   00000148   0080B0E1           MOVS     R8,R0
    322                  OS_EventTOAbort(pevent);                      /* Timed out, Make task ready                    */
   \   0000014C   0400B0E1           MOVS     R0,R4
   \   00000150   ........           _BLF     OS_EventTOAbort,??OS_EventTOAbort??rA
    323                  OS_EXIT_CRITICAL();
   \   00000154   0900B0E1           MOVS     R0,R9
   \   00000158   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rA
    324                  switch (pend_stat) {
   \   0000015C   0800B0E1           MOVS     R0,R8
   \   00000160   020050E3           CMP      R0,#+2
   \   00000164   0200000A           BEQ      ??OSMboxPend_9
    325                      case OS_STAT_PEND_TO:
    326                      default:
    327                           *err = OS_ERR_TIMEOUT;               /* Indicate that a timeout occured               */
   \                     ??OSMboxPend_10:
   \   00000168   0A00A0E3           MOV      R0,#+10
   \   0000016C   0000C6E5           STRB     R0,[R6, #+0]
   \   00000170   010000EA           B        ??OSMboxPend_11
    328                           break;
    329          
    330                      case OS_STAT_PEND_ABORT:
    331                           *err = OS_ERR_PEND_ABORT;            /* Indicate that we aborted                      */
   \                     ??OSMboxPend_9:
   \   00000174   0E00A0E3           MOV      R0,#+14
   \   00000178   0000C6E5           STRB     R0,[R6, #+0]
    332                           break;
    333                  }
    334                  return ((void *)0);                           /* Return a NULL message                         */
   \                     ??OSMboxPend_11:
   \   0000017C   0000A0E3           MOV      R0,#+0
   \   00000180   140000EA           B        ??OSMboxPend_1
    335              }
    336              msg                     = OSTCBCur->OSTCBMsg;
   \                     ??OSMboxPend_8:
   \   00000184   54009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   00000188   000090E5           LDR      R0,[R0, #+0]
   \   0000018C   200090E5           LDR      R0,[R0, #+32]
   \   00000190   0070B0E1           MOVS     R7,R0
    337              OSTCBCur->OSTCBMsg      = (void *)0;              /* Yes, clear message received                   */
   \   00000194   44009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   00000198   000090E5           LDR      R0,[R0, #+0]
   \   0000019C   0010A0E3           MOV      R1,#+0
   \   000001A0   201080E5           STR      R1,[R0, #+32]
    338              OSTCBCur->OSTCBStat     = OS_STAT_RDY;
   \   000001A4   34009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   000001A8   000090E5           LDR      R0,[R0, #+0]
   \   000001AC   0010A0E3           MOV      R1,#+0
   \   000001B0   2C10C0E5           STRB     R1,[R0, #+44]
    339              OSTCBCur->OSTCBEventPtr = (OS_EVENT *)0;          /* No longer waiting for event                   */
   \   000001B4   24009FE5           LDR      R0,??OSMboxPend_5+0x4  ;; OSTCBCur
   \   000001B8   000090E5           LDR      R0,[R0, #+0]
   \   000001BC   0010A0E3           MOV      R1,#+0
   \   000001C0   1C1080E5           STR      R1,[R0, #+28]
    340              OS_EXIT_CRITICAL();
   \   000001C4   0900B0E1           MOVS     R0,R9
   \   000001C8   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rA
    341              *err                    = OS_ERR_NONE;
   \   000001CC   0000A0E3           MOV      R0,#+0
   \   000001D0   0000C6E5           STRB     R0,[R6, #+0]
    342              return (msg);                                     /* Return the message received                   */
   \   000001D4   0700B0E1           MOVS     R0,R7
   \                     ??OSMboxPend_1:
   \   000001D8   F083BDE8           POP      {R4-R9,PC}       ;; return
   \                     ??OSMboxPend_5:
   \   000001DC   ........           DC32     OSLockNesting
   \   000001E0   ........           DC32     OSTCBCur
    343          }
    344          /*$PAGE*/
    345          /*
    346          *********************************************************************************************************
    347          *                                      ABORT WAITING ON A MESSAGE MAILBOX
    348          *
    349          * Description: This function aborts & readies any tasks currently waiting on a mailbox.  This function 
    350          *              should be used to fault-abort the wait on the mailbox, rather than to normally signal
    351          *              the mailbox via OSMboxPost() or OSMboxPostOpt().
    352          *
    353          * Arguments  : pevent        is a pointer to the event control block associated with the desired mailbox.
    354          *
    355          *              opt           determines the type of ABORT performed:
    356          *                            OS_PEND_OPT_NONE         ABORT wait for a single task (HPT) waiting on the
    357          *                                                     mailbox
    358          *                            OS_PEND_OPT_BROADCAST    ABORT wait for ALL tasks that are  waiting on the
    359          *                                                     mailbox
    360          *
    361          *              err           is a pointer to where an error message will be deposited.  Possible error
    362          *                            messages are:
    363          *
    364          *                            OS_ERR_NONE         No tasks were     waiting on the mailbox.
    365          *                            OS_ERR_PEND_ABORT   At least one task waiting on the mailbox was readied
    366          *                                                and informed of the aborted wait; check return value 
    367          *                                                for the number of tasks whose wait on the mailbox 
    368          *                                                was aborted.
    369          *                            OS_ERR_EVENT_TYPE   If you didn't pass a pointer to a mailbox.
    370          *                            OS_ERR_PEVENT_NULL  If 'pevent' is a NULL pointer.
    371          *
    372          * Returns    : == 0          if no tasks were waiting on the mailbox, or upon error.
    373          *              >  0          if one or more tasks waiting on the mailbox are now readied and informed.
    374          *********************************************************************************************************
    375          */
    376          
    377          #if OS_MBOX_PEND_ABORT_EN > 0

   \                                 In segment CODE, align 4, keep-with-next
    378          INT8U  OSMboxPendAbort (OS_EVENT *pevent, INT8U opt, INT8U *err)
    379          {
   \                     OSMboxPendAbort:
   \   00000000   F0412DE9           PUSH     {R4-R8,LR}
   \   00000004   0040B0E1           MOVS     R4,R0
   \   00000008   0150B0E1           MOVS     R5,R1
   \   0000000C   0260B0E1           MOVS     R6,R2
    380              INT8U      nbr_tasks;
    381          #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    382              OS_CPU_SR  cpu_sr = 0;
   \   00000010   0000A0E3           MOV      R0,#+0
   \   00000014   0080B0E1           MOVS     R8,R0
    383          #endif
    384          
    385          
    386          
    387          #if OS_ARG_CHK_EN > 0
    388              if (err == (INT8U *)0) {                               /* Validate 'err'                           */
   \   00000018   000056E3           CMP      R6,#+0
   \   0000001C   0100001A           BNE      ??OSMboxPendAbort_0
    389                  return (0);
   \   00000020   0000A0E3           MOV      R0,#+0
   \   00000024   330000EA           B        ??OSMboxPendAbort_1
    390              }
    391              if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */
   \                     ??OSMboxPendAbort_0:
   \   00000028   000054E3           CMP      R4,#+0
   \   0000002C   0300001A           BNE      ??OSMboxPendAbort_2
    392                  *err = OS_ERR_PEVENT_NULL;
   \   00000030   0400A0E3           MOV      R0,#+4
   \   00000034   0000C6E5           STRB     R0,[R6, #+0]
    393                  return (0);
   \   00000038   0000A0E3           MOV      R0,#+0
   \   0000003C   2D0000EA           B        ??OSMboxPendAbort_1
    394              }
    395          #endif
    396              if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {       /* Validate event block type                */
   \                     ??OSMboxPendAbort_2:
   \   00000040   0000D4E5           LDRB     R0,[R4, #+0]
   \   00000044   010050E3           CMP      R0,#+1
   \   00000048   0300000A           BEQ      ??OSMboxPendAbort_3
    397                  *err = OS_ERR_EVENT_TYPE;
   \   0000004C   0100A0E3           MOV      R0,#+1
   \   00000050   0000C6E5           STRB     R0,[R6, #+0]
    398                  return (0);
   \   00000054   0000A0E3           MOV      R0,#+0
   \   00000058   260000EA           B        ??OSMboxPendAbort_1
    399              }
    400              OS_ENTER_CRITICAL();
   \                     ??OSMboxPendAbort_3:
   \   0000005C   ........           _BLF     OS_CPU_SR_Save,??OS_CPU_SR_Save??rA
   \   00000060   0080B0E1           MOVS     R8,R0
    401              if (pevent->OSEventGrp != 0) {                         /* See if any task waiting on mailbox?      */
   \   00000064   0A00D4E5           LDRB     R0,[R4, #+10]
   \   00000068   000050E3           CMP      R0,#+0
   \   0000006C   1C00000A           BEQ      ??OSMboxPendAbort_4
    402                  nbr_tasks = 0;
   \   00000070   0000A0E3           MOV      R0,#+0
   \   00000074   0070B0E1           MOVS     R7,R0
    403                  switch (opt) {
   \   00000078   0500B0E1           MOVS     R0,R5
   \   0000007C   010050E3           CMP      R0,#+1
   \   00000080   0900001A           BNE      ??OSMboxPendAbort_5
    404                      case OS_PEND_OPT_BROADCAST:                    /* Do we need to abort ALL waiting tasks?   */
    405                           while (pevent->OSEventGrp != 0) {         /* Yes, ready ALL tasks waiting on mailbox  */
   \                     ??OSMboxPendAbort_6:
   \   00000084   0A00D4E5           LDRB     R0,[R4, #+10]
   \   00000088   000050E3           CMP      R0,#+0
   \   0000008C   0C00000A           BEQ      ??OSMboxPendAbort_7
    406                               (void)OS_EventTaskRdy(pevent, (void *)0, OS_STAT_MBOX, OS_STAT_PEND_ABORT);
   \   00000090   0230A0E3           MOV      R3,#+2

⌨️ 快捷键说明

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