Skip to content

Commit 2eb2d65

Browse files
authored
Move header includes before extern c (FreeRTOS#1047)
1 parent 30afc1a commit 2eb2d65

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

include/FreeRTOS.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
*/
5050
#include <stdint.h> /* READ COMMENT ABOVE. */
5151

52-
/* *INDENT-OFF* */
53-
#ifdef __cplusplus
54-
extern "C" {
55-
#endif
56-
/* *INDENT-ON* */
57-
5852
/* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */
5953
#define TICK_TYPE_WIDTH_16_BITS 0
6054
#define TICK_TYPE_WIDTH_32_BITS 1
@@ -129,6 +123,12 @@
129123

130124
#endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */
131125

126+
/* *INDENT-OFF* */
127+
#ifdef __cplusplus
128+
extern "C" {
129+
#endif
130+
/* *INDENT-ON* */
131+
132132
#ifndef configUSE_C_RUNTIME_TLS_SUPPORT
133133
#define configUSE_C_RUNTIME_TLS_SUPPORT 0
134134
#endif

include/portable.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@
9494
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
9595
#endif
9696

97+
#include "mpu_wrappers.h"
98+
9799
/* *INDENT-OFF* */
98100
#ifdef __cplusplus
99101
extern "C" {
100102
#endif
101103
/* *INDENT-ON* */
102104

103-
#include "mpu_wrappers.h"
104-
105105
/*
106106
* Setup the stack of a new task so it is ready to be placed under the
107107
* scheduler control. The registers have to be placed on the stack in

include/queue.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
#error "include FreeRTOS.h" must appear in source files before "include queue.h"
3535
#endif
3636

37+
#include "task.h"
38+
3739
/* *INDENT-OFF* */
3840
#ifdef __cplusplus
3941
extern "C" {
4042
#endif
4143
/* *INDENT-ON* */
4244

43-
#include "task.h"
44-
4545
/**
4646
* Type by which queues are referenced. For example, a call to xQueueCreate()
4747
* returns an QueueHandle_t variable that can then be used as a parameter to

0 commit comments

Comments
 (0)