Skip to content

Commit

Permalink
Ensure that xTaskGetCurrentTaskHandle is included (FreeRTOS#507)
Browse files Browse the repository at this point in the history
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 <aggarg@amazon.com>
  • Loading branch information
aggarg authored Jun 23, 2022
1 parent 90d9204 commit 7af41c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stream_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7af41c2

Please sign in to comment.