mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03: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:
@@ -314,8 +314,8 @@
|
||||
* should be set to ( 2 | portPRIVILEGE_BIT ).
|
||||
*
|
||||
* @param xCoreID (only IDF SMP FreeRTOS)
|
||||
* The core to which the task is pinned to, or tskNO_AFFINITY if
|
||||
* the task can run on any core.
|
||||
* The core to which the task is pinned to, or tskNO_AFFINITY if the task has no
|
||||
* core affinity.
|
||||
*
|
||||
* @param uxCoreAffinityMask (only Amazon SMP FreeRTOS)
|
||||
* A bitwise value that indicates the cores on which the task can run.
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
* task. The task's pinned core is specified by the xCoreID argument. If xCoreID
|
||||
* is set to tskNO_AFFINITY, then the task is unpinned and can run on any core.
|
||||
*
|
||||
* @note If ( configNUM_CORES == 1 ), xCoreID is ignored.
|
||||
* @note If ( configNUMBER_OF_CORES == 1 ), setting xCoreID to tskNO_AFFINITY will be
|
||||
* be treated as 0.
|
||||
*
|
||||
* @param pxTaskCode Pointer to the task entry function.
|
||||
* @param pcName A descriptive name for the task.
|
||||
@@ -55,7 +56,7 @@
|
||||
* @param pxCreatedTask Used to pass back a handle by which the created task can
|
||||
* be referenced.
|
||||
* @param xCoreID The core to which the task is pinned to, or tskNO_AFFINITY if
|
||||
* the task has no core affinity
|
||||
* the task has no core affinity.
|
||||
* @return pdPASS if the task was successfully created and added to a ready
|
||||
* list, otherwise an error code defined in the file projdefs.h
|
||||
*/
|
||||
@@ -79,7 +80,8 @@
|
||||
* xCoreID is set to tskNO_AFFINITY, then the task is unpinned and can run on any
|
||||
* core.
|
||||
*
|
||||
* @note If ( configNUM_CORES == 1 ), xCoreID is ignored.
|
||||
* @note If ( configNUMBER_OF_CORES == 1 ), setting xCoreID to tskNO_AFFINITY will be
|
||||
* be treated as 0.
|
||||
*
|
||||
* @param pxTaskCode Pointer to the task entry function.
|
||||
* @param pcName A descriptive name for the task.
|
||||
@@ -93,7 +95,7 @@
|
||||
* @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will
|
||||
* then be used to hold the task's data structures,
|
||||
* @param xCoreID The core to which the task is pinned to, or tskNO_AFFINITY if
|
||||
* the task has no core affinity
|
||||
* the task has no core affinity.
|
||||
* @return The task handle if the task was created, NULL otherwise.
|
||||
*/
|
||||
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||
|
||||
Reference in New Issue
Block a user