From 7af41c29cb1bd6587b814a1a95de73d811eacd74 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:17:17 -0700 Subject: [PATCH] Ensure that xTaskGetCurrentTaskHandle is included (#507) This commits adds a check that INCLUDE_xTaskGetCurrentTaskHandle is set to 1. A compile time error message is produced if it is not set to 1. This is needed because stream_buffer.c uses xTaskGetCurrentTaskHandle. This was reported here - https://forums.freertos.org/t/xstreambufferreceive-include-xtaskgetcur/15283 Signed-off-by: Gaurav Aggarwal --- stream_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stream_buffer.c b/stream_buffer.c index b9d598e17..e8a883983 100644 --- a/stream_buffer.c +++ b/stream_buffer.c @@ -44,6 +44,10 @@ #error configUSE_TASK_NOTIFICATIONS must be set to 1 to build stream_buffer.c #endif +#if ( INCLUDE_xTaskGetCurrentTaskHandle != 1 ) + #error INCLUDE_xTaskGetCurrentTaskHandle must be set to 1 to build stream_buffer.c +#endif + /* Lint e961, e9021 and e750 are suppressed as a MISRA exception justified * because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined * for the header files above, but not in this file, in order to generate the