mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 20:54:24 +00:00
feat(freertos/idf): Add taskVALID_CORE_ID() macro
This commit adds a taskVALID_CORE_ID() macro, similar to the one offered in Amazon SMP FreeRTOS. - Various functions have been updated to use that macro - Removed some unecessary static asserts of CONFIG_FREERTOS_NO_AFFINITY and added casting. - Uncrustify changes
This commit is contained in:
@@ -204,6 +204,15 @@ typedef enum
|
||||
#define tskNO_AFFINITY ( ( BaseType_t ) 0x7FFFFFFF )
|
||||
/* Todo: Update tskNO_AFFINITY value to -1 (IDF-7908) */
|
||||
|
||||
/**
|
||||
* Macro to check if an xCoreID value is valid
|
||||
*
|
||||
* @return pdTRUE if valid, pdFALSE otherwise.
|
||||
*
|
||||
* \ingroup Tasks
|
||||
*/
|
||||
#define taskVALID_CORE_ID( xCoreID ) ( ( ( ( ( BaseType_t ) xCoreID ) >= 0 && ( ( BaseType_t ) xCoreID ) < configNUMBER_OF_CORES ) || ( ( ( BaseType_t ) xCoreID ) == tskNO_AFFINITY ) ) ? pdTRUE : pdFALSE )
|
||||
|
||||
/**
|
||||
*
|
||||
* Macro for forcing a context switch.
|
||||
|
Reference in New Issue
Block a user