📄 blockq.s43
字号:
PUSH.W R9
CFI R9 Frame(CFA, -10)
CFI CFA SP+10
PUSH.W R6
CFI R6 Frame(CFA, -12)
CFI CFA SP+12
PUSH.W R7
CFI R7 Frame(CFA, -14)
CFI CFA SP+14
PUSH.W R4
CFI R4 Frame(CFA, -16)
CFI CFA SP+16
PUSH.W R5
CFI R5 Frame(CFA, -18)
CFI CFA SP+18
PUSH.W R12
CFI CFA SP+20
SUB.W #0x4, SP
CFI CFA SP+24
// 100 xBlockingQueueParameters *pxQueueParameters1, *pxQueueParameters2;
// 101 xBlockingQueueParameters *pxQueueParameters3, *pxQueueParameters4;
// 102 xBlockingQueueParameters *pxQueueParameters5, *pxQueueParameters6;
// 103 const unsigned portBASE_TYPE uxQueueSize1 = 1, uxQueueSize5 = 5;
MOV.W #0x1, 0x0(SP)
MOV.W #0x5, 0x2(SP)
// 104 const portTickType xBlockTime = ( portTickType ) 1000 / portTICK_RATE_MS;
MOV.W #0x3e8, R4
// 105 const portTickType xDontBlock = ( portTickType ) 0;
MOV.W #0x0, R5
// 106
// 107 /* Create the first two tasks as described at the top of the file. */
// 108
// 109 /* First create the structure used to pass parameters to the consumer tasks. */
// 110 pxQueueParameters1 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R10
// 111
// 112 /* Create the queue used by the first two tasks to pass the incrementing number.
// 113 Pass a pointer to the queue in the parameter structure. */
// 114 pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
MOV.W #0x2, R14
MOV.W 0x0(SP), R12
CALL #xQueueCreate
MOV.W R12, 0(R10)
// 115
// 116 /* The consumer is created first so gets a block time as described above. */
// 117 pxQueueParameters1->xBlockTime = xBlockTime;
MOV.W R4, 0x2(R10)
// 118
// 119 /* Pass in the variable that this task is going to increment so we can check it
// 120 is still running. */
// 121 pxQueueParameters1->psCheckVariable = &( sBlockingConsumerCount[ 0 ] );
MOV.W #sBlockingConsumerCount, 0x4(R10)
// 122
// 123 /* Create the structure used to pass parameters to the producer task. */
// 124 pxQueueParameters2 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R11
// 125
// 126 /* Pass the queue to this task also, using the parameter structure. */
// 127 pxQueueParameters2->xQueue = pxQueueParameters1->xQueue;
MOV.W @R10, 0(R11)
// 128
// 129 /* The producer is not going to block - as soon as it posts the consumer will
// 130 wake and remove the item so the producer should always have room to post. */
// 131 pxQueueParameters2->xBlockTime = xDontBlock;
MOV.W R5, 0x2(R11)
// 132
// 133 /* Pass in the variable that this task is going to increment so we can check
// 134 it is still running. */
// 135 pxQueueParameters2->psCheckVariable = &( sBlockingProducerCount[ 0 ] );
MOV.W #sBlockingProducerCount, 0x4(R11)
// 136
// 137
// 138 /* Note the producer has a lower priority than the consumer when the tasks are
// 139 spawned. */
// 140 xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL );
PUSH.W #0x0
CFI CFA SP+26
PUSH.W 0x8(SP)
CFI CFA SP+28
PUSH.W R10
CFI CFA SP+30
PUSH.W #0x40
CFI CFA SP+32
MOV.W #`?<Constant "QConsB1">`, R14
MOV.W #vBlockingQueueConsumer, R12
CALL #xTaskCreate
// 141 xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL );
PUSH.W #0x0
CFI CFA SP+34
PUSH.W #0x0
CFI CFA SP+36
PUSH.W R11
CFI CFA SP+38
PUSH.W #0x40
CFI CFA SP+40
MOV.W #`?<Constant "QProdB2">`, R14
MOV.W #vBlockingQueueProducer, R12
CALL #xTaskCreate
// 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 ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R8
// 149 pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
MOV.W #0x2, R14
MOV.W 0x10(SP), R12
CALL #xQueueCreate
MOV.W R12, 0(R8)
// 150 pxQueueParameters3->xBlockTime = xDontBlock;
MOV.W R5, 0x2(R8)
// 151 pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );
MOV.W #sBlockingProducerCount + 2, 0x4(R8)
// 152
// 153 pxQueueParameters4 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R9
// 154 pxQueueParameters4->xQueue = pxQueueParameters3->xQueue;
MOV.W @R8, 0(R9)
// 155 pxQueueParameters4->xBlockTime = xBlockTime;
MOV.W R4, 0x2(R9)
// 156 pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] );
MOV.W #sBlockingConsumerCount + 2, 0x4(R9)
// 157
// 158 xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL );
PUSH.W #0x0
CFI CFA SP+42
PUSH.W #0x0
CFI CFA SP+44
PUSH.W R8
CFI CFA SP+46
PUSH.W #0x40
CFI CFA SP+48
MOV.W #`?<Constant "QProdB3">`, R14
MOV.W #vBlockingQueueProducer, R12
CALL #xTaskCreate
// 159 xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL );
PUSH.W #0x0
CFI CFA SP+50
PUSH.W 0x20(SP)
CFI CFA SP+52
PUSH.W R9
CFI CFA SP+54
PUSH.W #0x40
CFI CFA SP+56
MOV.W #`?<Constant "QConsB4">`, R14
MOV.W #vBlockingQueueConsumer, R12
CALL #xTaskCreate
// 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 ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R6
// 166 pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
MOV.W #0x2, R14
MOV.W 0x22(SP), R12
CALL #xQueueCreate
MOV.W R12, 0(R6)
// 167 pxQueueParameters5->xBlockTime = xBlockTime;
MOV.W R4, 0x2(R6)
// 168 pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );
MOV.W #sBlockingProducerCount + 4, 0x4(R6)
// 169
// 170 pxQueueParameters6 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
MOV.W #0x6, R12
CALL #pvPortMalloc
MOV.W R12, R7
// 171 pxQueueParameters6->xQueue = pxQueueParameters5->xQueue;
MOV.W @R6, 0(R7)
// 172 pxQueueParameters6->xBlockTime = xBlockTime;
MOV.W R4, 0x2(R7)
// 173 pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] );
MOV.W #sBlockingConsumerCount + 4, 0x4(R7)
// 174
// 175 xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL );
PUSH.W #0x0
CFI CFA SP+58
PUSH.W #0x0
CFI CFA SP+60
PUSH.W R6
CFI CFA SP+62
PUSH.W #0x40
CFI CFA SP+64
MOV.W #`?<Constant "QProdB5">`, R14
MOV.W #vBlockingQueueProducer, R12
CALL #xTaskCreate
// 176 xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL );
PUSH.W #0x0
CFI CFA SP+66
PUSH.W #0x0
CFI CFA SP+68
PUSH.W R7
CFI CFA SP+70
PUSH.W #0x40
CFI CFA SP+72
MOV.W #`?<Constant "QConsB6">`, R14
MOV.W #vBlockingQueueConsumer, R12
CALL #xTaskCreate
// 177 }
ADD.W #0x36, SP
CFI CFA SP+18
BR #?Epilogue8
CFI EndBlock cfiBlock0
// 178 /*-----------------------------------------------------------*/
// 179
RSEG CODE:CODE:REORDER:NOROOT(1)
// 180 static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters )
vBlockingQueueProducer:
CFI Block cfiBlock1 Using cfiCommon0
CFI Function vBlockingQueueProducer
// 181 {
FUNCALL vBlockingQueueProducer, xQueueSend
LOCFRAME CSTACK, 12, STACK
PUSH.W R10
CFI R10 Frame(CFA, -4)
CFI CFA SP+4
PUSH.W R11
CFI R11 Frame(CFA, -6)
CFI CFA SP+6
PUSH.W R8
CFI R8 Frame(CFA, -8)
CFI CFA SP+8
SUB.W #0x2, SP
CFI CFA SP+10
MOV.W R12, R10
// 182 unsigned portSHORT usValue = 0;
MOV.W #0x0, 0x0(SP)
// 183 xBlockingQueueParameters *pxQueueParameters;
// 184 portSHORT sErrorEverOccurred = pdFALSE;
MOV.W #0x0, R8
// 185
// 186 pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
MOV.W R10, R11
// 187
// 188 for( ;; )
// 189 {
// 190 if( xQueueSend( pxQueueParameters->xQueue, ( void * ) &usValue, pxQueueParameters->xBlockTime ) != pdPASS )
??vBlockingQueueProducer_0:
PUSH.W 0x2(R11)
CFI CFA SP+12
MOV.W SP, R14
ADD.W #0x2, R14
MOV.W @R11, R12
CALL #xQueueSend
ADD.W #0x2, SP
CFI CFA SP+10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -