Function esp_idf_svc::sys::xTaskGetCoreID
source · pub unsafe extern "C" fn xTaskGetCoreID(
xTask: *mut tskTaskControlBlock,
) -> i32
Expand description
@brief Get the current core ID of a particular task
Helper function to get the core ID of a particular task. If the task is pinned to a particular core, the core ID is returned. If the task is not pinned to a particular core, tskNO_AFFINITY is returned.
If CONFIG_FREERTOS_UNICORE is enabled, this function simply returns 0.
[refactor-todo] See if this needs to be deprecated (IDF-8145)(IDF-8164)
@note If CONFIG_FREERTOS_SMP is enabled, please call vTaskCoreAffinityGet() instead. @note In IDF FreerTOS when configNUMBER_OF_CORES == 1, this function will always return 0, @param xTask The task to query @return The task’s core ID or tskNO_AFFINITY