From 46d54990d84ab4fefd8e8a695f931967568a037b Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Mon, 6 Sep 2021 15:53:06 +0530 Subject: [PATCH] freertos: remove xSemaphoreAltTake/Give macros from upstream files xSemaphoreAltTake and xSemaphoreAltGive are Espressif defined macros and are not being used. The respective definitions, xQueueAltGenericReceive and xQueueAltGenericSend are also not part of current FreeRTOS source (v10.4.3). Hence, removed xSemaphoreAltTake and xSemaphoreAltGive definitions to align with upstream code. Signed-off-by: Sudeep Mohanty --- components/freertos/include/freertos/semphr.h | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/components/freertos/include/freertos/semphr.h b/components/freertos/include/freertos/semphr.h index d693eddd4f..b29736285a 100644 --- a/components/freertos/include/freertos/semphr.h +++ b/components/freertos/include/freertos/semphr.h @@ -410,23 +410,6 @@ typedef QueueHandle_t SemaphoreHandle_t; */ #define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) ) -#ifdef ESP_PLATFORM // IDF-3814 -/** @cond */ -/* - * xSemaphoreAltTake() is an alternative version of xSemaphoreTake(). - * - * The source code that implements the alternative (Alt) API is much - * simpler because it executes everything from within a critical section. - * This is the approach taken by many other RTOSes, but FreeRTOS.org has the - * preferred fully featured API too. The fully featured API has more - * complex code that takes longer to execute, but makes much less use of - * critical sections. Therefore the alternative API sacrifices interrupt - * responsiveness to gain execution speed, whereas the fully featured API - * sacrifices execution speed to ensure better interrupt responsiveness. - */ -#define xSemaphoreAltTake( xSemaphore, xBlockTime ) xQueueAltGenericReceive( ( QueueHandle_t ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE ) -/** @endcond */ -#endif // ESP_PLATFORM /** * Macro to release a semaphore. The semaphore must have previously been * created with a call to xSemaphoreCreateBinary(), xSemaphoreCreateMutex() or @@ -579,25 +562,6 @@ typedef QueueHandle_t SemaphoreHandle_t; */ #define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( ( xMutex ) ) -#ifdef ESP_PLATFORM // IDF-3814 -/** @cond */ -/* - * xSemaphoreAltGive() is an alternative version of xSemaphoreGive(). - * - * The source code that implements the alternative (Alt) API is much - * simpler because it executes everything from within a critical section. - * This is the approach taken by many other RTOSes, but FreeRTOS.org has the - * preferred fully featured API too. The fully featured API has more - * complex code that takes longer to execute, but makes much less use of - * critical sections. Therefore the alternative API sacrifices interrupt - * responsiveness to gain execution speed, whereas the fully featured API - * sacrifices execution speed to ensure better interrupt responsiveness. - */ -#define xSemaphoreAltGive( xSemaphore ) xQueueAltGenericSend( ( QueueHandle_t ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK ) - -/** @endcond */ -#endif // ESP_PLATFORM - /** * Macro to release a semaphore. The semaphore must have previously been * created with a call to xSemaphoreCreateBinary() or xSemaphoreCreateCounting().