📄 queue.lst
字号:
\ 00000012 401C ADD R0,R0,#+0x1
\ 00000014 E065 STR R0,[R4, #+0x5C]
\ 00000016 206E LDR R0,[R4, #+0x60]
\ 00000018 401C ADD R0,R0,#+0x1
\ 0000001A 2066 STR R0,[R4, #+0x60]
\ 0000001C ........ _BLF vPortExitCritical,vPortExitCritical??rT
425
426 /* If there are no messages in the queue we may have to block. */
427 if( prvIsQueueEmpty( pxQueue ) )
\ 00000020 ........ _BLF vPortEnterCritical,vPortEnterCritical??rT
\ 00000024 206D LDR R0,[R4, #+0x50]
\ 00000026 471E SUB R7,R0,#+0x1
\ 00000028 BF41 SBC R7,R7
\ 0000002A FF0F LSR R7,R7,#+0x1F
\ 0000002C ........ _BLF vPortExitCritical,vPortExitCritical??rT
\ 00000030 002F CMP R7,#+0
\ 00000032 1ED0 BEQ ??xQueueReceive_0
428 {
429 /* There are no messages in the queue, do we want to block or just
430 leave with nothing? */
431 if( xTicksToWait > ( portTickType ) 0 )
\ 00000034 002E CMP R6,#+0
\ 00000036 1CD0 BEQ ??xQueueReceive_0
432 {
433 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
\ 00000038 311C MOV R1,R6
\ 0000003A 201C MOV R0,R4
\ 0000003C 3030 ADD R0,#+0x30
\ 0000003E ........ _BLF vTaskPlaceOnEventList,vTaskPlaceOnEventList??rT
434 taskENTER_CRITICAL();
\ 00000042 ........ _BLF vPortEnterCritical,vPortEnterCritical??rT
435 {
436 prvUnlockQueue( pxQueue );
\ 00000046 201C MOV R0,R4
\ 00000048 ........ BL ??prvUnlockQueue
437 if( !xTaskResumeAll() )
\ 0000004C ........ _BLF xTaskResumeAll,xTaskResumeAll??rT
\ 00000050 0028 CMP R0,#+0
\ 00000052 00D1 BNE ??xQueueReceive_1
438 {
439 taskYIELD();
\ 00000054 00DF SWI 0
440 }
441
442 vTaskSuspendAll();
\ ??xQueueReceive_1:
\ 00000056 ........ _BLF vTaskSuspendAll,vTaskSuspendAll??rT
443 prvLockQueue( pxQueue );
\ 0000005A ........ _BLF vPortEnterCritical,vPortEnterCritical??rT
\ 0000005E E06D LDR R0,[R4, #+0x5C]
\ 00000060 401C ADD R0,R0,#+0x1
\ 00000062 E065 STR R0,[R4, #+0x5C]
\ 00000064 206E LDR R0,[R4, #+0x60]
\ 00000066 401C ADD R0,R0,#+0x1
\ 00000068 2066 STR R0,[R4, #+0x60]
\ 0000006A ........ _BLF vPortExitCritical,vPortExitCritical??rT
444 }
445 taskEXIT_CRITICAL();
\ 0000006E ........ _BLF vPortExitCritical,vPortExitCritical??rT
446 }
447 }
448
449 taskENTER_CRITICAL();
\ ??xQueueReceive_0:
\ 00000072 ........ _BLF vPortEnterCritical,vPortEnterCritical??rT
450 {
451 if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
\ 00000076 206D LDR R0,[R4, #+0x50]
\ 00000078 0028 CMP R0,#+0
\ 0000007A 17D0 BEQ ??xQueueReceive_2
452 {
453 pxQueue->pcReadFrom += pxQueue->uxItemSize;
\ 0000007C A16D LDR R1,[R4, #+0x58]
\ 0000007E E268 LDR R2,[R4, #+0xC]
\ 00000080 5118 ADD R1,R2,R1
\ 00000082 E160 STR R1,[R4, #+0xC]
454 if( pxQueue->pcReadFrom >= pxQueue->pcTail )
\ 00000084 6268 LDR R2,[R4, #+0x4]
\ 00000086 9142 CMP R1,R2
\ 00000088 01D3 BCC ??xQueueReceive_3
455 {
456 pxQueue->pcReadFrom = pxQueue->pcHead;
\ 0000008A 2168 LDR R1,[R4, #+0]
\ 0000008C E160 STR R1,[R4, #+0xC]
457 }
458 --( pxQueue->uxMessagesWaiting );
\ ??xQueueReceive_3:
\ 0000008E 401E SUB R0,R0,#+0x1
\ 00000090 2065 STR R0,[R4, #+0x50]
459 memcpy( ( void * ) pcBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned ) pxQueue->uxItemSize );
\ 00000092 A06D LDR R0,[R4, #+0x58]
\ 00000094 E168 LDR R1,[R4, #+0xC]
\ 00000096 0028 CMP R0,#+0
\ 00000098 03D0 BEQ ??xQueueReceive_4
\ ??xQueueReceive_5:
\ 0000009A 401E SUB R0,R0,#+0x1
\ 0000009C 0A5C LDRB R2,[R1, R0]
\ 0000009E 2A54 STRB R2,[R5, R0]
\ 000000A0 FBD1 BNE ??xQueueReceive_5
460
461 /* Increment the lock count so prvUnlockQueue knows to check for
462 tasks waiting for space to become available on the queue. */
463 ++( pxQueue->xRxLock );
\ ??xQueueReceive_4:
\ 000000A2 E06D LDR R0,[R4, #+0x5C]
\ 000000A4 401C ADD R0,R0,#+0x1
\ 000000A6 E065 STR R0,[R4, #+0x5C]
464 xReturn = pdPASS;
\ 000000A8 0125 MOV R5,#+0x1
\ 000000AA 00E0 B ??xQueueReceive_6
465 }
466 else
467 {
468 xReturn = pdFAIL;
\ ??xQueueReceive_2:
\ 000000AC 0025 MOV R5,#+0
469 }
470 }
471 taskEXIT_CRITICAL();
\ ??xQueueReceive_6:
\ 000000AE ........ _BLF vPortExitCritical,vPortExitCritical??rT
472
473 /* We no longer require exclusive access to the queue. */
474 if( prvUnlockQueue( pxQueue ) )
\ 000000B2 201C MOV R0,R4
\ 000000B4 ........ BL ??prvUnlockQueue
\ 000000B8 0028 CMP R0,#+0
\ 000000BA 05D0 BEQ ??xQueueReceive_7
475 {
476 if( !xTaskResumeAll() )
\ 000000BC ........ _BLF xTaskResumeAll,xTaskResumeAll??rT
\ 000000C0 0028 CMP R0,#+0
\ 000000C2 03D1 BNE ??xQueueReceive_8
477 {
478 taskYIELD();
\ 000000C4 00DF SWI 0
\ 000000C6 01E0 B ??xQueueReceive_8
479 }
480 }
481 else
482 {
483 xTaskResumeAll();
\ ??xQueueReceive_7:
\ 000000C8 ........ _BLF xTaskResumeAll,xTaskResumeAll??rT
484 }
485
486 return xReturn;
\ ??xQueueReceive_8:
\ 000000CC 281C MOV R0,R5
\ 000000CE F0BC POP {R4-R7}
\ 000000D0 02BC POP {R1}
\ 000000D2 0847 BX R1 ;; return
487 }
488 /*-----------------------------------------------------------*/
489
\ In segment CODE, align 4, keep-with-next
490 signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle pxQueue, void *pcBuffer, signed portBASE_TYPE *pxTaskWoken )
491 {
\ xQueueReceiveFromISR:
\ 00000000 70B5 PUSH {R4-R6,LR}
\ 00000002 141C MOV R4,R2
492 signed portBASE_TYPE xReturn;
493
494 /* We cannot block from an ISR, so check there is data available. */
495 if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )
\ 00000004 026D LDR R2,[R0, #+0x50]
\ 00000006 002A CMP R2,#+0
\ 00000008 28D0 BEQ ??xQueueReceiveFromISR_0
496 {
497 /* Copy the data from the queue. */
498 pxQueue->pcReadFrom += pxQueue->uxItemSize;
\ 0000000A 836D LDR R3,[R0, #+0x58]
\ 0000000C C568 LDR R5,[R0, #+0xC]
\ 0000000E EB18 ADD R3,R5,R3
\ 00000010 C360 STR R3,[R0, #+0xC]
499 if( pxQueue->pcReadFrom >= pxQueue->pcTail )
\ 00000012 4568 LDR R5,[R0, #+0x4]
\ 00000014 AB42 CMP R3,R5
\ 00000016 01D3 BCC ??xQueueReceiveFromISR_1
500 {
501 pxQueue->pcReadFrom = pxQueue->pcHead;
\ 00000018 0368 LDR R3,[R0, #+0]
\ 0000001A C360 STR R3,[R0, #+0xC]
502 }
503 --( pxQueue->uxMessagesWaiting );
\ ??xQueueReceiveFromISR_1:
\ 0000001C 0023 MOV R3,#+0
\ 0000001E DB43 MVN R3,R3 ;; #-1
\ 00000020 D218 ADD R2,R2,R3
\ 00000022 0265 STR R2,[R0, #+0x50]
504 memcpy( ( void * ) pcBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned ) pxQueue->uxItemSize );
\ 00000024 826D LDR R2,[R0, #+0x58]
\ 00000026 C568 LDR R5,[R0, #+0xC]
\ 00000028 002A CMP R2,#+0
\ 0000002A 03D0 BEQ ??xQueueReceiveFromISR_2
\ ??xQueueReceiveFromISR_3:
\ 0000002C 521E SUB R2,R2,#+0x1
\ 0000002E AE5C LDRB R6,[R5, R2]
\ 00000030 8E54 STRB R6,[R1, R2]
\ 00000032 FBD1 BNE ??xQueueReceiveFromISR_3
505
506 /* If the queue is locked we will not modify the event list. Instead
507 we update the lock count so the task that unlocks the queue will know
508 that an ISR has removed data while the queue was locked. */
509 if( pxQueue->xRxLock == queueUNLOCKED )
\ ??xQueueReceiveFromISR_2:
\ 00000034 C16D LDR R1,[R0, #+0x5C]
\ 00000036 0125 MOV R5,#+0x1
\ 00000038 9942 CMP R1,R3
\ 0000003A 0CD1 BNE ??xQueueReceiveFromISR_4
510 {
511 /* We only want to wake one task per ISR, so check that a task has
512 not already been woken. */
513 if( !( *pxTaskWoken ) )
\ 0000003C 2168 LDR R1,[R4, #+0]
\ 0000003E 0029 CMP R1,#+0
\ 00000040 0DD1 BNE ??xQueueReceiveFromISR_5
514 {
515 if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) )
\ 00000042 0169 LDR R1,[R0, #+0x10]
\ 00000044 0029 CMP R1,#+0
\ 00000046 0AD0 BEQ ??xQueueReceiveFromISR_5
516 {
517 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
\ 00000048 1030 ADD R0,#+0x10
\ 0000004A ........ _BLF xTaskRemoveFromEventList,xTaskRemoveFromEventList??rT
\ 0000004E 0028 CMP R0,#+0
\ 00000050 05D0 BEQ ??xQueueReceiveFromISR_5
518 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -