From 2eb2d653bff44addcc03ee8f72b2d3bdc33a787f Mon Sep 17 00:00:00 2001 From: Holden <68555040+HTRamsey@users.noreply.github.com> Date: Mon, 6 May 2024 17:24:05 -0700 Subject: [PATCH] Move header includes before extern c (#1047) --- include/FreeRTOS.h | 12 ++++++------ include/portable.h | 4 ++-- include/queue.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index f7a59a765..b972ffd10 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -49,12 +49,6 @@ */ #include /* READ COMMENT ABOVE. */ -/* *INDENT-OFF* */ -#ifdef __cplusplus - extern "C" { -#endif -/* *INDENT-ON* */ - /* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */ #define TICK_TYPE_WIDTH_16_BITS 0 #define TICK_TYPE_WIDTH_32_BITS 1 @@ -129,6 +123,12 @@ #endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */ +/* *INDENT-OFF* */ +#ifdef __cplusplus + extern "C" { +#endif +/* *INDENT-ON* */ + #ifndef configUSE_C_RUNTIME_TLS_SUPPORT #define configUSE_C_RUNTIME_TLS_SUPPORT 0 #endif diff --git a/include/portable.h b/include/portable.h index a20a3daa3..f7afb6979 100644 --- a/include/portable.h +++ b/include/portable.h @@ -94,14 +94,14 @@ #define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0 #endif +#include "mpu_wrappers.h" + /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif /* *INDENT-ON* */ -#include "mpu_wrappers.h" - /* * Setup the stack of a new task so it is ready to be placed under the * scheduler control. The registers have to be placed on the stack in diff --git a/include/queue.h b/include/queue.h index 5704ea768..1e56c35f1 100644 --- a/include/queue.h +++ b/include/queue.h @@ -34,14 +34,14 @@ #error "include FreeRTOS.h" must appear in source files before "include queue.h" #endif +#include "task.h" + /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif /* *INDENT-ON* */ -#include "task.h" - /** * Type by which queues are referenced. For example, a call to xQueueCreate() * returns an QueueHandle_t variable that can then be used as a parameter to