File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 8787#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
8888
8989 #define taskCHECK_FOR_STACK_OVERFLOW () \
90- { \
90+ do { \
9191 const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
9292 const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
9393 \
9898 { \
9999 vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
100100 } \
101- }
101+ } while(0)
102102
103103#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
104104/*-----------------------------------------------------------*/
Original file line number Diff line number Diff line change 170170/*-----------------------------------------------------------*/
171171
172172 #define taskSELECT_HIGHEST_PRIORITY_TASK () \
173- { \
173+ do { \
174174 UBaseType_t uxTopPriority; \
175175 \
176176 /* Find the highest priority list that contains ready tasks. */ \
177177 portGET_HIGHEST_PRIORITY ( uxTopPriority , uxTopReadyPriority ); \
178178 configASSERT ( listCURRENT_LIST_LENGTH ( & ( pxReadyTasksLists [ uxTopPriority ] ) ) > 0 ); \
179179 listGET_OWNER_OF_NEXT_ENTRY ( pxCurrentTCB , & ( pxReadyTasksLists [ uxTopPriority ] ) ); \
180- } /* taskSELECT_HIGHEST_PRIORITY_TASK() */
180+ } while ( 0 )
181181
182182/*-----------------------------------------------------------*/
183183
184184/* A port optimised version is provided, call it only if the TCB being reset
185185 * is being referenced from a ready list. If it is referenced from a delayed
186186 * or suspended list then it won't be in a ready list. */
187187 #define taskRESET_READY_PRIORITY ( uxPriority ) \
188- { \
188+ do { \
189189 if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
190190 { \
191191 portRESET_READY_PRIORITY( ( uxPriority ), ( uxTopReadyPriority ) ); \
192192 } \
193- }
193+ } while(0)
194194
195195#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
196196
You can’t perform that action at this time.
0 commit comments