From a67e8c1972529fe7b9b3e9e2e4c52c69f7157140 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Mon, 28 Aug 2023 20:21:41 +0800 Subject: [PATCH] refactor(freertos): Rename freertos_v8_compat.c to freertos_compatibility.c Rename API compatibility file to be more general, and add a proper description. --- components/freertos/CMakeLists.txt | 2 +- ...{freertos_v8_compat.c => freertos_compatibility.c} | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) rename components/freertos/esp_additions/{freertos_v8_compat.c => freertos_compatibility.c} (59%) diff --git a/components/freertos/CMakeLists.txt b/components/freertos/CMakeLists.txt index 2c93a4016b..17e6749d1e 100644 --- a/components/freertos/CMakeLists.txt +++ b/components/freertos/CMakeLists.txt @@ -103,7 +103,7 @@ list(APPEND srcs if(kernel_impl STREQUAL "FreeRTOS-Kernel") list(APPEND srcs - "esp_additions/freertos_v8_compat.c") + "esp_additions/freertos_compatibility.c") endif() if(arch STREQUAL "linux") diff --git a/components/freertos/esp_additions/freertos_v8_compat.c b/components/freertos/esp_additions/freertos_compatibility.c similarity index 59% rename from components/freertos/esp_additions/freertos_v8_compat.c rename to components/freertos/esp_additions/freertos_compatibility.c index eda3675ee6..009fde8b8e 100644 --- a/components/freertos/esp_additions/freertos_v8_compat.c +++ b/components/freertos/esp_additions/freertos_compatibility.c @@ -4,11 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +/* + * FreeRTOS has changed some functions in to macros (and vice-versa) over multiple + * releases. This is not a breaking API change for source code, but may cause issues + * for pre-compiled libraries that call these removed APIs. + * + * This file maintains these legacy APIs until the next ESP-IDF major release. + * + * Todo: Clean up for ESP-IDF v6.0 (IDF-8144) +*/ + #include "FreeRTOS.h" #include "queue.h" #include "semphr.h" -/* This API is kept for backward ABI compatibility with prebuilt libraries against FreeRTOS v8/v9 in ESP-IDF */ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xPeek ) { if ( xPeek == pdTRUE )