forked from espressif/esp-idf
refactor(freertos/idf): Implicitly include idf_additions.h from FreeRTOS.h
This commit adds an implicit inclusion of `idf_additions.h` to `FreeRTOS.h` in preparation for moving some IDf specific API to `idf_additions.h`. This implict inclusion allows existing code to be continue using these relocated APIs without any changes in header inclusions. Also removed "#pragma once" directive from "freertos_tasks_c_additions.h" since that header is included as a source file.
This commit is contained in:
@@ -1393,11 +1393,29 @@ typedef StaticStreamBuffer_t StaticMessageBuffer_t;
|
|||||||
#endif
|
#endif
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/* IDF API additions have been moved to idf_additions.h when building for
|
/*-----------------------------------------------------------
|
||||||
* Amazon SMP FreeRTOS. However, the rest of ESP-IDF has not been updated to
|
* IDF Compatibility
|
||||||
* include this header explicitly when calling this additional API. Thus, we
|
*----------------------------------------------------------*/
|
||||||
* include this here as a workaround until the rest of ESP-IDF can be updated
|
|
||||||
* to include idf_additions.h explicitly. */
|
#ifdef ESP_PLATFORM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Include ESP-IDF API additions implicitly for compatibility reasons.
|
||||||
|
*
|
||||||
|
* ESP-IDF API additions were previously added directly to FreeRTOS headers
|
||||||
|
* (e.g., task.h, queue.h). These APIs have now been moved to
|
||||||
|
* idf_additions.h.
|
||||||
|
*
|
||||||
|
* To ensure there are no breaking changes, we include idf_additions.h
|
||||||
|
* implicitly here so that those API additions are still accessible. Given
|
||||||
|
* that FreeRTOS.h must be included first before calling any FreeRTOS API,
|
||||||
|
* any existing source code can continue using these relocated APIs without
|
||||||
|
* any additional header inclusions via this implicit inclusion.
|
||||||
|
*
|
||||||
|
* Todo: Deprecate this implicit inclusion by ESP-IDF v6.0 (IDF-8126)
|
||||||
|
*/
|
||||||
#include "freertos/idf_additions.h"
|
#include "freertos/idf_additions.h"
|
||||||
|
|
||||||
|
#endif /* ESP_PLATFORM */
|
||||||
|
|
||||||
#endif /* INC_FREERTOS_H */
|
#endif /* INC_FREERTOS_H */
|
||||||
|
@@ -3321,8 +3321,6 @@ core 0 during startup.
|
|||||||
void vTaskStartSchedulerOtherCores( void );
|
void vTaskStartSchedulerOtherCores( void );
|
||||||
#endif // configNUM_CORES > 1
|
#endif // configNUM_CORES > 1
|
||||||
|
|
||||||
#include "freertos/idf_additions.h"
|
|
||||||
|
|
||||||
#endif //ESP_PLATFORM
|
#endif //ESP_PLATFORM
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1404,4 +1404,29 @@ typedef StaticStreamBuffer_t StaticMessageBuffer_t;
|
|||||||
#endif
|
#endif
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------
|
||||||
|
* IDF Compatibility
|
||||||
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef ESP_PLATFORM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Include ESP-IDF API additions implicitly for compatibility reasons.
|
||||||
|
*
|
||||||
|
* ESP-IDF API additions were previously added directly to FreeRTOS headers
|
||||||
|
* (e.g., task.h, queue.h). These APIs have now been moved to
|
||||||
|
* idf_additions.h.
|
||||||
|
*
|
||||||
|
* To ensure there are no breaking changes, we include idf_additions.h
|
||||||
|
* implicitly here so that those API additions are still accessible. Given
|
||||||
|
* that FreeRTOS.h must be included first before calling any FreeRTOS API,
|
||||||
|
* any existing source code can continue using these relocated APIs without
|
||||||
|
* any additional header inclusions via this implicit inclusion.
|
||||||
|
*
|
||||||
|
* Todo: Deprecate this implicit inclusion by ESP-IDF v6.0 (IDF-8126)
|
||||||
|
*/
|
||||||
|
#include "freertos/idf_additions.h"
|
||||||
|
|
||||||
|
#endif /* ESP_PLATFORM */
|
||||||
|
|
||||||
#endif /* INC_FREERTOS_H */
|
#endif /* INC_FREERTOS_H */
|
||||||
|
@@ -4,8 +4,6 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "freertos/idf_additions.h"
|
#include "freertos/idf_additions.h"
|
||||||
#if CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
|
#if CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||||
|
Reference in New Issue
Block a user