Update format

This commit is contained in:
Ching-Hsin,Lee 2024-07-08 17:26:41 +08:00
parent 926224e7fd
commit 937dcf11fe

36
tasks.c
View file

@ -84,16 +84,16 @@
portYIELD_WITHIN_API(); \ portYIELD_WITHIN_API(); \
} while( 0 ) } while( 0 )
#define taskYIELD_ANY_CORE_IF_USING_PREEMPTION( pxTCB ) \ #define taskYIELD_ANY_CORE_IF_USING_PREEMPTION( pxTCB ) \
do { \ do { \
if( ( prvGetCurrentTCBUnsafe()->uxPriority ) < ( pxTCB )->uxPriority ) \ if( ( prvGetCurrentTCBUnsafe()->uxPriority ) < ( pxTCB )->uxPriority ) \
{ \ { \
portYIELD_WITHIN_API(); \ portYIELD_WITHIN_API(); \
} \ } \
else \ else \
{ \ { \
mtCOVERAGE_TEST_MARKER(); \ mtCOVERAGE_TEST_MARKER(); \
} \ } \
} while( 0 ) } while( 0 )
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #else /* if ( configNUMBER_OF_CORES == 1 ) */
@ -187,9 +187,9 @@
} \ } \
\ \
/* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of \ /* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of \
* the same priority get an equal share of the processor time. */ \ * the same priority get an equal share of the processor time. */ \
listGET_OWNER_OF_NEXT_ENTRY( prvGetCurrentTCBUnsafe(), &( pxReadyTasksLists[ uxTopPriority ] ) ); \ listGET_OWNER_OF_NEXT_ENTRY( prvGetCurrentTCBUnsafe(), &( pxReadyTasksLists[ uxTopPriority ] ) ); \
uxTopReadyPriority = uxTopPriority; \ uxTopReadyPriority = uxTopPriority; \
} while( 0 ) /* taskSELECT_HIGHEST_PRIORITY_TASK */ } while( 0 ) /* taskSELECT_HIGHEST_PRIORITY_TASK */
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #else /* if ( configNUMBER_OF_CORES == 1 ) */
@ -216,13 +216,13 @@
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#define taskSELECT_HIGHEST_PRIORITY_TASK() \ #define taskSELECT_HIGHEST_PRIORITY_TASK() \
do { \ do { \
UBaseType_t uxTopPriority; \ UBaseType_t uxTopPriority; \
\ \
/* Find the highest priority list that contains ready tasks. */ \ /* Find the highest priority list that contains ready tasks. */ \
portGET_HIGHEST_PRIORITY( uxTopPriority, uxTopReadyPriority ); \ portGET_HIGHEST_PRIORITY( uxTopPriority, uxTopReadyPriority ); \
configASSERT( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ uxTopPriority ] ) ) > 0 ); \ configASSERT( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ uxTopPriority ] ) ) > 0 ); \
listGET_OWNER_OF_NEXT_ENTRY( prvGetCurrentTCBUnsafe(), &( pxReadyTasksLists[ uxTopPriority ] ) ); \ listGET_OWNER_OF_NEXT_ENTRY( prvGetCurrentTCBUnsafe(), &( pxReadyTasksLists[ uxTopPriority ] ) ); \
} while( 0 ) } while( 0 )