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

📄 os_q.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
    453              OSTCBCur->OSTCBStat     |= OS_STAT_Q;        /* Task will have to pend for a message to be posted  */
   \                     ??OSQPend_4:
   \   0000008C   ........           LDR.W    R0,??DataTable4_4
   \   00000090   0068               LDR      R0,[R0, #+0]
   \   00000092   90F83400           LDRB     R0,[R0, #+52]
   \   00000096   50F00400           ORRS     R0,R0,#0x4
   \   0000009A   ........           LDR.W    R1,??DataTable4_4
   \   0000009E   0968               LDR      R1,[R1, #+0]
   \   000000A0   81F83400           STRB     R0,[R1, #+52]
    454              OSTCBCur->OSTCBStatPend  = OS_STAT_PEND_OK;
   \   000000A4   ........           LDR.W    R0,??DataTable4_4
   \   000000A8   0068               LDR      R0,[R0, #+0]
   \   000000AA   0021               MOVS     R1,#+0
   \   000000AC   80F83510           STRB     R1,[R0, #+53]
    455              OSTCBCur->OSTCBDly       = timeout;          /* Load timeout into TCB                              */
   \   000000B0   ........           LDR.W    R0,??DataTable4_4
   \   000000B4   0068               LDR      R0,[R0, #+0]
   \   000000B6   0563               STR      R5,[R0, #+48]
    456              OS_EventTaskWait(pevent);                    /* Suspend task until event or timeout occurs         */
   \   000000B8   2000               MOVS     R0,R4
   \   000000BA   ........           BL       OS_EventTaskWait
    457              OS_EXIT_CRITICAL();
   \   000000BE   4846               MOV      R0,R9
   \   000000C0   ........           BL       OS_CPU_SR_Restore
    458              OS_Sched();                                  /* Find next highest priority task ready to run       */
   \   000000C4   ........           BL       OS_Sched
    459              OS_ENTER_CRITICAL();
   \   000000C8   ........           BL       OS_CPU_SR_Save
   \   000000CC   8146               MOV      R9,R0
    460              switch (OSTCBCur->OSTCBStatPend) {                /* See if we timed-out or aborted                */
   \   000000CE   ........           LDR.W    R0,??DataTable4_4
   \   000000D2   0068               LDR      R0,[R0, #+0]
   \   000000D4   90F83500           LDRB     R0,[R0, #+53]
   \   000000D8   0028               CMP      R0,#+0
   \   000000DA   02D0               BEQ.N    ??OSQPend_6
   \   000000DC   0228               CMP      R0,#+2
   \   000000DE   07D0               BEQ.N    ??OSQPend_7
   \   000000E0   0BE0               B.N      ??OSQPend_8
    461                  case OS_STAT_PEND_OK:                         /* Extract message from TCB (Put there by QPost) */
    462                       pmsg =  OSTCBCur->OSTCBMsg;
   \                     ??OSQPend_6:
   \   000000E2   ....               LDR.N    R0,??DataTable4_4
   \   000000E4   0068               LDR      R0,[R0, #+0]
   \   000000E6   406A               LDR      R0,[R0, #+36]
   \   000000E8   0700               MOVS     R7,R0
    463                      *perr =  OS_ERR_NONE;
   \   000000EA   0020               MOVS     R0,#+0
   \   000000EC   3070               STRB     R0,[R6, #+0]
    464                       break;
   \   000000EE   0DE0               B.N      ??OSQPend_9
    465          
    466                  case OS_STAT_PEND_ABORT:
    467                       pmsg = (void *)0;
   \                     ??OSQPend_7:
   \   000000F0   0020               MOVS     R0,#+0
   \   000000F2   0700               MOVS     R7,R0
    468                      *perr =  OS_ERR_PEND_ABORT;               /* Indicate that we aborted                      */
   \   000000F4   0E20               MOVS     R0,#+14
   \   000000F6   3070               STRB     R0,[R6, #+0]
    469                       break;
   \   000000F8   08E0               B.N      ??OSQPend_9
    470          
    471                  case OS_STAT_PEND_TO:
    472                  default:
    473                       OS_EventTaskRemove(OSTCBCur, pevent);
   \                     ??OSQPend_8:
   \   000000FA   2100               MOVS     R1,R4
   \   000000FC   ....               LDR.N    R0,??DataTable4_4
   \   000000FE   0068               LDR      R0,[R0, #+0]
   \   00000100   ........           BL       OS_EventTaskRemove
    474                       pmsg = (void *)0;
   \   00000104   0020               MOVS     R0,#+0
   \   00000106   0700               MOVS     R7,R0
    475                      *perr =  OS_ERR_TIMEOUT;                  /* Indicate that we didn't get event within TO   */
   \   00000108   0A20               MOVS     R0,#+10
   \   0000010A   3070               STRB     R0,[R6, #+0]
    476                       break;
    477              }
    478              OSTCBCur->OSTCBStat          =  OS_STAT_RDY;      /* Set   task  status to ready                   */
   \                     ??OSQPend_9:
   \   0000010C   ....               LDR.N    R0,??DataTable4_4
   \   0000010E   0068               LDR      R0,[R0, #+0]
   \   00000110   0021               MOVS     R1,#+0
   \   00000112   80F83410           STRB     R1,[R0, #+52]
    479              OSTCBCur->OSTCBStatPend      =  OS_STAT_PEND_OK;  /* Clear pend  status                            */
   \   00000116   ....               LDR.N    R0,??DataTable4_4
   \   00000118   0068               LDR      R0,[R0, #+0]
   \   0000011A   0021               MOVS     R1,#+0
   \   0000011C   80F83510           STRB     R1,[R0, #+53]
    480              OSTCBCur->OSTCBEventPtr      = (OS_EVENT  *)0;    /* Clear event pointers                          */
   \   00000120   ....               LDR.N    R0,??DataTable4_4
   \   00000122   0068               LDR      R0,[R0, #+0]
   \   00000124   0021               MOVS     R1,#+0
   \   00000126   C161               STR      R1,[R0, #+28]
    481          #if (OS_EVENT_MULTI_EN > 0u)
    482              OSTCBCur->OSTCBEventMultiPtr = (OS_EVENT **)0;
   \   00000128   ....               LDR.N    R0,??DataTable4_4
   \   0000012A   0068               LDR      R0,[R0, #+0]
   \   0000012C   0021               MOVS     R1,#+0
   \   0000012E   0162               STR      R1,[R0, #+32]
    483          #endif
    484              OSTCBCur->OSTCBMsg           = (void      *)0;    /* Clear  received message                       */
   \   00000130   ....               LDR.N    R0,??DataTable4_4
   \   00000132   0068               LDR      R0,[R0, #+0]
   \   00000134   0021               MOVS     R1,#+0
   \   00000136   4162               STR      R1,[R0, #+36]
    485              OS_EXIT_CRITICAL();
   \   00000138   4846               MOV      R0,R9
   \   0000013A   ........           BL       OS_CPU_SR_Restore
    486              return (pmsg);                                    /* Return received message                       */
   \   0000013E   3800               MOVS     R0,R7
   \                     ??OSQPend_1:
   \   00000140   BDE8F283           POP      {R1,R4-R9,PC}    ;; return
    487          }
    488          /*$PAGE*/
    489          /*
    490          *********************************************************************************************************
    491          *                                      ABORT WAITING ON A MESSAGE QUEUE
    492          *
    493          * Description: This function aborts & readies any tasks currently waiting on a queue.  This function
    494          *              should be used to fault-abort the wait on the queue, rather than to normally signal
    495          *              the queue via OSQPost(), OSQPostFront() or OSQPostOpt().
    496          *
    497          * Arguments  : pevent        is a pointer to the event control block associated with the desired queue.
    498          *
    499          *              opt           determines the type of ABORT performed:
    500          *                            OS_PEND_OPT_NONE         ABORT wait for a single task (HPT) waiting on the
    501          *                                                     queue
    502          *                            OS_PEND_OPT_BROADCAST    ABORT wait for ALL tasks that are  waiting on the
    503          *                                                     queue
    504          *
    505          *              perr          is a pointer to where an error message will be deposited.  Possible error
    506          *                            messages are:
    507          *
    508          *                            OS_ERR_NONE         No tasks were     waiting on the queue.
    509          *                            OS_ERR_PEND_ABORT   At least one task waiting on the queue was readied
    510          *                                                and informed of the aborted wait; check return value
    511          *                                                for the number of tasks whose wait on the queue
    512          *                                                was aborted.
    513          *                            OS_ERR_EVENT_TYPE   If you didn't pass a pointer to a queue.
    514          *                            OS_ERR_PEVENT_NULL  If 'pevent' is a NULL pointer.
    515          *
    516          * Returns    : == 0          if no tasks were waiting on the queue, or upon error.
    517          *              >  0          if one or more tasks waiting on the queue are now readied and informed.
    518          *********************************************************************************************************
    519          */
    520          
    521          #if OS_Q_PEND_ABORT_EN > 0u

   \                                 In section .text, align 2, keep-with-next
    522          INT8U  OSQPendAbort (OS_EVENT  *pevent,
    523                               INT8U      opt,
    524                               INT8U     *perr)
    525          {
   \                     OSQPendAbort:
   \   00000000   2DE9F041           PUSH     {R4-R8,LR}
   \   00000004   0400               MOVS     R4,R0
   \   00000006   0D00               MOVS     R5,R1
   \   00000008   1600               MOVS     R6,R2
    526              INT8U      nbr_tasks;
    527          #if OS_CRITICAL_METHOD == 3u                               /* Allocate storage for CPU status register */
    528              OS_CPU_SR  cpu_sr = 0u;
   \   0000000A   5FF00008           MOVS     R8,#+0
    529          #endif
    530          
    531          
    532          
    533          #ifdef OS_SAFETY_CRITICAL
    534              if (perr == (INT8U *)0) {
    535                  OS_SAFETY_CRITICAL_EXCEPTION();
    536                  return (0u);
    537              }
    538          #endif
    539          
    540          #if OS_ARG_CHK_EN > 0u
    541              if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */
    542                  *perr = OS_ERR_PEVENT_NULL;
    543                  return (0u);
    544              }
    545          #endif
    546              if (pevent->OSEventType != OS_EVENT_TYPE_Q) {          /* Validate event block type                */
   \   0000000E   2078               LDRB     R0,[R4, #+0]
   \   00000010   0228               CMP      R0,#+2
   \   00000012   03D0               BEQ.N    ??OSQPendAbort_0
    547                  *perr = OS_ERR_EVENT_TYPE;
   \   00000014   0120               MOVS     R0,#+1
   \   00000016   3070               STRB     R0,[R6, #+0]
    548                  return (0u);
   \   00000018   0020               MOVS     R0,#+0
   \   0000001A   2DE0               B.N      ??OSQPendAbort_1
    549              }
    550              OS_ENTER_CRITICAL();
   \                     ??OSQPendAbort_0:
   \   0000001C   ........           BL       OS_CPU_SR_Save
   \   00000020   8046               MOV      R8,R0
    551              if (pevent->OSEventGrp != 0u) {                        /* See if any task waiting on queue?        */
   \   00000022   A07A               LDRB     R0,[R4, #+10]
   \   00000024   0028               CMP      R0,#+0
   \   00000026   21D0               BEQ.N    ??OSQPendAbort_2
    552                  nbr_tasks = 0u;
   \   00000028   0020               MOVS     R0,#+0
   \   0000002A   0700               MOVS     R7,R0
    553                  switch (opt) {
   \   0000002C   EDB2               UXTB     R5,R5            ;; ZeroExt  R5,R5,#+24,#+24
   \   0000002E   012D               CMP      R5,#+1
   \   00000030   0BD1               BNE.N    ??OSQPendAbort_3
    554                      case OS_PEND_OPT_BROADCAST:                    /* Do we need to abort ALL waiting tasks?   */
    555                           while (pevent->OSEventGrp != 0u) {        /* Yes, ready ALL tasks waiting on queue    */
   \                     ?

⌨️ 快捷键说明

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