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:
Darian Leung
2023-11-16 19:41:24 +08:00
parent ae2bd61054
commit 439c7c4261
10 changed files with 99 additions and 41 deletions

View File

@@ -1289,8 +1289,9 @@ typedef struct xSTATIC_TCB
UBaseType_t uxDummy5;
void * pxDummy6;
uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
/* Todo: Remove xCoreID for single core builds (IDF-7894) */
BaseType_t xDummyCoreID;
#if ( configNUMBER_OF_CORES > 1 )
BaseType_t xDummyCoreID;
#endif /* configNUMBER_OF_CORES > 1 */
#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
void * pxDummy8;
#endif