mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
This commit is contained in:
@@ -140,7 +140,7 @@ static void vPortTaskWrapper(TaskFunction_t pxCode, void *pvParameters)
|
||||
{
|
||||
pxCode(pvParameters);
|
||||
//FreeRTOS tasks should not return. Log the task name and abort.
|
||||
char *pcTaskName = pcTaskGetTaskName(NULL);
|
||||
char *pcTaskName = pcTaskGetName(NULL);
|
||||
ESP_LOGE("FreeRTOS", "FreeRTOS Task \"%s\" should not return, Aborting now!", pcTaskName);
|
||||
abort();
|
||||
}
|
||||
|
@@ -219,6 +219,13 @@ menu "FreeRTOS"
|
||||
|
||||
For most uses, the default of 16 is OK.
|
||||
|
||||
config FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
|
||||
bool "Support legacy FreeRTOS API"
|
||||
default n
|
||||
help
|
||||
This option enables the configENABLE_BACKWARD_COMPATIBILITY option, thus allowing the usage
|
||||
of legacy function names and types present in versions prior to FreeRTOS v8.0.0.
|
||||
|
||||
config FREERTOS_SUPPORT_STATIC_ALLOCATION
|
||||
# Always enabled.
|
||||
# Kconfig option preserved for compatibility with code
|
||||
|
@@ -191,6 +191,12 @@
|
||||
#define configUSE_NEWLIB_REENTRANT 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
|
||||
#define configENABLE_BACKWARD_COMPATIBILITY 1
|
||||
#else
|
||||
#define configENABLE_BACKWARD_COMPATIBILITY 0
|
||||
#endif
|
||||
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||
|
||||
|
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/*
|
||||
Combined unit tests & benchmarking for spinlock "portMUX" functionality
|
||||
*/
|
||||
@@ -73,7 +78,7 @@ TEST_CASE("portMUX recursive locks (no contention)", "[freertos]")
|
||||
|
||||
static volatile int shared_value;
|
||||
static portMUX_TYPE shared_mux;
|
||||
static xSemaphoreHandle done_sem;
|
||||
static SemaphoreHandle_t done_sem;
|
||||
|
||||
static void task_shared_value_increment(void *ignore)
|
||||
{
|
||||
|
Reference in New Issue
Block a user