mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-13 16:57:35 +00:00
change(freertos/idf): Remove xCoreID TCB member for single-core
This commit does the following:
- removes the xCoreID member from the TCB when building for single-core
- xCoreID is no longer hard set to 0 when calling "PinnedToCore" task creation
functions in single-core
- Tidy up or add missing xCoreID asserts for functions that take xCoreID as an
argument:
- Functions that set/query a variable of a particular core will call
taskVALID_CORE_ID() to ensure ) 0 <= xCoreID < configNUMBER_OF_CORES
- Task creation functions that accept xCoreID also call taskVALID_CORE_ID()
but also allow tskNO_AFFINITY.
- Fix TaskStatus_t
- Remove xCoreID from TaskStatus_t if configTASKLIST_INCLUDE_COREID is not
defined.
- Set xCoreID to 0 when calling vTaskGetInfo() in single-core builds
This commit is contained in:
@@ -176,7 +176,9 @@ typedef struct xTASK_STATUS
|
||||
StackType_t * pxEndOfStack; /**< Points to the end address of the task's stack area. */
|
||||
#endif
|
||||
configSTACK_DEPTH_TYPE usStackHighWaterMark; /**< The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
|
||||
BaseType_t xCoreID; /**< Core this task is pinned to (0, 1, or tskNO_AFFINITY). If configNUMBER_OF_CORES == 1, this will always be 0. */
|
||||
#if ( configTASKLIST_INCLUDE_COREID == 1 )
|
||||
BaseType_t xCoreID; /**< Core this task is pinned to (0, 1, or tskNO_AFFINITY). If configNUMBER_OF_CORES == 1, this will always be 0. */
|
||||
#endif
|
||||
} TaskStatus_t;
|
||||
|
||||
/** Possible return values for eTaskConfirmSleepModeStatus(). */
|
||||
@@ -211,7 +213,7 @@ typedef enum
|
||||
*
|
||||
* \ingroup Tasks
|
||||
*/
|
||||
#define taskVALID_CORE_ID( xCoreID ) ( ( ( ( ( BaseType_t ) xCoreID ) >= 0 && ( ( BaseType_t ) xCoreID ) < configNUMBER_OF_CORES ) || ( ( ( BaseType_t ) xCoreID ) == tskNO_AFFINITY ) ) ? pdTRUE : pdFALSE )
|
||||
#define taskVALID_CORE_ID( xCoreID ) ( ( ( ( BaseType_t ) xCoreID ) >= 0 && ( ( BaseType_t ) xCoreID ) < configNUMBER_OF_CORES ) ? pdTRUE : pdFALSE )
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user