📄 blockq.lst
字号:
\ 00000046 314E LDR R6,??vStartBlockingQueueTasks_0+0x8 ;; ??vBlockingQueueProducer
\ 00000048 281C MOV R0,R5
\ 0000004A 01B4 PUSH {R0}
\ 0000004C 01B4 PUSH {R0}
\ 0000004E 3B1C MOV R3,R7
\ 00000050 6422 MOV R2,#+0x64
\ 00000052 2F49 LDR R1,??vStartBlockingQueueTasks_0+0xC ;; `?<Constant "QProdB2">`
\ 00000054 301C MOV R0,R6
\ 00000056 ........ _BLF xTaskCreate,xTaskCreate??rT
142
143
144
145 /* Create the second two tasks as described at the top of the file. This uses
146 the same mechanism but reverses the task priorities. */
147
148 pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
\ 0000005A 0C20 MOV R0,#+0xC
\ 0000005C ........ _BLF pvPortMalloc,pvPortMalloc??rT
\ 00000060 071C MOV R7,R0
149 pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
\ 00000062 0221 MOV R1,#+0x2
\ 00000064 0120 MOV R0,#+0x1
\ 00000066 ........ _BLF xQueueCreate,xQueueCreate??rT
\ 0000006A 3860 STR R0,[R7, #+0]
150 pxQueueParameters3->xBlockTime = xDontBlock;
\ 0000006C 7D60 STR R5,[R7, #+0x4]
151 pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );
\ 0000006E 2948 LDR R0,??vStartBlockingQueueTasks_0+0x10 ;; ??sBlockingProducerCount + 2
\ 00000070 B860 STR R0,[R7, #+0x8]
152
153 pxQueueParameters4 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
\ 00000072 0C20 MOV R0,#+0xC
\ 00000074 ........ _BLF pvPortMalloc,pvPortMalloc??rT
\ 00000078 051C MOV R5,R0
154 pxQueueParameters4->xQueue = pxQueueParameters3->xQueue;
\ 0000007A 3868 LDR R0,[R7, #+0]
\ 0000007C 2860 STR R0,[R5, #+0]
155 pxQueueParameters4->xBlockTime = xBlockTime;
\ 0000007E 6C60 STR R4,[R5, #+0x4]
156 pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] );
\ 00000080 2548 LDR R0,??vStartBlockingQueueTasks_0+0x14 ;; ??sBlockingConsumerCount + 2
\ 00000082 A860 STR R0,[R5, #+0x8]
157
158 xTaskCreate( vBlockingQueueProducer, "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL );
\ 00000084 0020 MOV R0,#+0
\ 00000086 01B4 PUSH {R0}
\ 00000088 01B4 PUSH {R0}
\ 0000008A 3B1C MOV R3,R7
\ 0000008C 6422 MOV R2,#+0x64
\ 0000008E 2349 LDR R1,??vStartBlockingQueueTasks_0+0x18 ;; `?<Constant "QProdB3">`
\ 00000090 301C MOV R0,R6
\ 00000092 ........ _BLF xTaskCreate,xTaskCreate??rT
159 xTaskCreate( vBlockingQueueConsumer, "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL );
\ 00000096 0020 MOV R0,#+0
\ 00000098 01B4 PUSH {R0}
\ 0000009A 0798 LDR R0,[SP, #+0x1C]
\ 0000009C 01B4 PUSH {R0}
\ 0000009E 2B1C MOV R3,R5
\ 000000A0 6422 MOV R2,#+0x64
\ 000000A2 1F49 LDR R1,??vStartBlockingQueueTasks_0+0x1C ;; `?<Constant "QConsB4">`
\ 000000A4 1848 LDR R0,??vStartBlockingQueueTasks_0+0x4 ;; ??vBlockingQueueConsumer
\ 000000A6 ........ _BLF xTaskCreate,xTaskCreate??rT
160
161
162
163 /* Create the last two tasks as described above. The mechanism is again just
164 the same. This time both parameter structures are given a block time. */
165 pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
\ 000000AA 0C20 MOV R0,#+0xC
\ 000000AC ........ _BLF pvPortMalloc,pvPortMalloc??rT
\ 000000B0 051C MOV R5,R0
166 pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
\ 000000B2 0221 MOV R1,#+0x2
\ 000000B4 0520 MOV R0,#+0x5
\ 000000B6 ........ _BLF xQueueCreate,xQueueCreate??rT
\ 000000BA 2860 STR R0,[R5, #+0]
167 pxQueueParameters5->xBlockTime = xBlockTime;
\ 000000BC 6C60 STR R4,[R5, #+0x4]
168 pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );
\ 000000BE 1948 LDR R0,??vStartBlockingQueueTasks_0+0x20 ;; ??sBlockingProducerCount + 4
\ 000000C0 A860 STR R0,[R5, #+0x8]
169
170 pxQueueParameters6 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
\ 000000C2 0C20 MOV R0,#+0xC
\ 000000C4 ........ _BLF pvPortMalloc,pvPortMalloc??rT
\ 000000C8 071C MOV R7,R0
171 pxQueueParameters6->xQueue = pxQueueParameters5->xQueue;
\ 000000CA 2868 LDR R0,[R5, #+0]
\ 000000CC 3860 STR R0,[R7, #+0]
172 pxQueueParameters6->xBlockTime = xBlockTime;
\ 000000CE 7C60 STR R4,[R7, #+0x4]
173 pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] );
\ 000000D0 1548 LDR R0,??vStartBlockingQueueTasks_0+0x24 ;; ??sBlockingConsumerCount + 4
\ 000000D2 B860 STR R0,[R7, #+0x8]
174
175 xTaskCreate( vBlockingQueueProducer, "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL );
\ 000000D4 0020 MOV R0,#+0
\ 000000D6 01B4 PUSH {R0}
\ 000000D8 01B4 PUSH {R0}
\ 000000DA 2B1C MOV R3,R5
\ 000000DC 6422 MOV R2,#+0x64
\ 000000DE 1349 LDR R1,??vStartBlockingQueueTasks_0+0x28 ;; `?<Constant "QProdB5">`
\ 000000E0 301C MOV R0,R6
\ 000000E2 ........ _BLF xTaskCreate,xTaskCreate??rT
\ 000000E6 0AB0 ADD SP,#+0x28
176 xTaskCreate( vBlockingQueueConsumer, "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL );
\ 000000E8 0020 MOV R0,#+0
\ 000000EA 01B4 PUSH {R0}
\ 000000EC 01B4 PUSH {R0}
\ 000000EE 3B1C MOV R3,R7
\ 000000F0 6422 MOV R2,#+0x64
\ 000000F2 0F49 LDR R1,??vStartBlockingQueueTasks_0+0x2C ;; `?<Constant "QConsB6">`
\ 000000F4 0448 LDR R0,??vStartBlockingQueueTasks_0+0x4 ;; ??vBlockingQueueConsumer
\ 000000F6 ........ _BLF xTaskCreate,xTaskCreate??rT
177 }
\ 000000FA 03B0 ADD SP,#+0xC
\ 000000FC F0BC POP {R4-R7}
\ 000000FE 01BC POP {R0}
\ 00000100 0047 BX R0 ;; return
\ 00000102 C046 NOP
\ ??vStartBlockingQueueTasks_0:
\ 00000104 ........ DC32 `?<Constant "QConsB1">`
\ 00000108 ........ DC32 ??vBlockingQueueConsumer
\ 0000010C ........ DC32 ??vBlockingQueueProducer
\ 00000110 ........ DC32 `?<Constant "QProdB2">`
\ 00000114 ........ DC32 ??sBlockingProducerCount + 2
\ 00000118 ........ DC32 ??sBlockingConsumerCount + 2
\ 0000011C ........ DC32 `?<Constant "QProdB3">`
\ 00000120 ........ DC32 `?<Constant "QConsB4">`
\ 00000124 ........ DC32 ??sBlockingProducerCount + 4
\ 00000128 ........ DC32 ??sBlockingConsumerCount + 4
\ 0000012C ........ DC32 `?<Constant "QProdB5">`
\ 00000130 ........ DC32 `?<Constant "QConsB6">`
178 /*-----------------------------------------------------------*/
179
\ In segment CODE, align 4, keep-with-next
180 static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters )
181 {
\ ??vBlockingQueueProducer:
\ 00000000 30B5 PUSH {R4,R5,LR}
\ 00000002 81B0 SUB SP,#+0x4
\ 00000004 041C MOV R4,R0
182 unsigned portSHORT usValue = 0;
\ 00000006 6846 MOV R0,SP
\ 00000008 0021 MOV R1,#+0
\ 0000000A 0180 STRH R1,[R0, #+0]
183 xBlockingQueueParameters *pxQueueParameters;
184 portSHORT sErrorEverOccurred = pdFALSE;
\ 0000000C 0025 MOV R5,#+0
185
186 pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
\ 0000000E 00E0 B ??vBlockingQueueProducer_1
187
188 for( ;; )
189 {
190 if( xQueueSend( pxQueueParameters->xQueue, ( void * ) &usValue, pxQueueParameters->xBlockTime ) != pdPASS )
191 {
192 sErrorEverOccurred = pdTRUE;
\ ??vBlockingQueueProducer_2:
\ 00000010 0125 MOV R5,#+0x1
193 }
\ ??vBlockingQueueProducer_1:
\ 00000012 6268 LDR R2,[R4, #+0x4]
\ 00000014 6946 MOV R1,SP
\ 00000016 2068 LDR R0,[R4, #+0]
\ 00000018 ........ _BLF xQueueSend,xQueueSend??rT
\ 0000001C 0128 CMP R0,#+0x1
\ 0000001E F7D1 BNE ??vBlockingQueueProducer_2
194 else
195 {
196 /* We have successfully posted a message, so increment the variable
197 used to check we are still running. */
198 if( sErrorEverOccurred == pdFALSE )
\ 00000020 002D CMP R5,#+0
\ 00000022 04D1 BNE ??vBlockingQueueProducer_3
199 {
200 ( *pxQueueParameters->psCheckVariable )++;
\ 00000024 A068 LDR R0,[R4, #+0x8]
\ 00000026 0021 MOV R1,#+0
\ 00000028 415E LDRSH R1,[R0, R1]
\ 0000002A 491C ADD R1,R1,#+0x1
\ 0000002C 0180 STRH R1,[R0, #+0]
201 }
202
203 /* Increment the variable we are going to post next time round. The
204 consumer will expect the numbers to follow in numerical order. */
205 ++usValue;
\ ??vBlockingQueueProducer_3:
\ 0000002E 6846 MOV R0,SP
\ 00000030 6946 MOV R1,SP
\ 00000032 0988 LDRH R1,[R1, #+0]
\ 00000034 491C ADD R1,R1,#+0x1
\ 00000036 0180 STRH R1,[R0, #+0]
\ 00000038 EBE7 B ??vBlockingQueueProducer_1
206 }
207 }
208 }
209 /*-----------------------------------------------------------*/
210
\ In segment CODE, align 4, keep-with-next
211 static portTASK_FUNCTION( vBlockingQueueConsumer, pvParameters )
212 {
\ ??vBlockingQueueConsumer:
\ 00000000 70B5 PUSH {R4-R6,LR}
\ 00000002 81B0 SUB SP,#+0x4
\ 00000004 041C MOV R4,R0
213 unsigned portSHORT usData, usExpectedValue = 0;
\ 00000006 0025 MOV R5,#+0
214 xBlockingQueueParameters *pxQueueParameters;
215 portSHORT sErrorEverOccurred = pdFALSE;
\ 00000008 0026 MOV R6,#+0
216
217 pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
\ 0000000A 02E0 B ??vBlockingQueueConsumer_1
218
219 for( ;; )
220 {
221 if( xQueueReceive( pxQueueParameters->xQueue, &usData, pxQueueParameters->xBlockTime ) == pdPASS )
222 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -