From 79ad69cf081a3b2fadc0989e56874e3296396816 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 1 Sep 2008 08:18:50 +0000 Subject: [PATCH] Added a #error line to check that FreeRTOS.h is included before one of the subordinate header files. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@466 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/include/croutine.h | 8 ++++++++ Source/include/queue.h | 7 +++++++ Source/include/semphr.h | 4 ++++ Source/include/task.h | 9 +++++---- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Source/include/croutine.h b/Source/include/croutine.h index 9b55e079d..149bd7e1f 100644 --- a/Source/include/croutine.h +++ b/Source/include/croutine.h @@ -46,6 +46,14 @@ http://www.OpenRTOS.com - Commercial support, development, porting, licensing and training services. */ + +#ifndef INC_FREERTOS_H + #error #error "#include FreeRTOS.h" must appear in source files before "#include croutine.h" +#endif + + + + #ifndef CO_ROUTINE_H #define CO_ROUTINE_H diff --git a/Source/include/queue.h b/Source/include/queue.h index 10b7f418c..2d3962f56 100644 --- a/Source/include/queue.h +++ b/Source/include/queue.h @@ -47,6 +47,13 @@ licensing and training services. */ +#ifndef INC_FREERTOS_H + #error "#include FreeRTOS.h" must appear in source files before "#include queue.h" +#endif + + + + #ifndef QUEUE_H #define QUEUE_H diff --git a/Source/include/semphr.h b/Source/include/semphr.h index c6b1d02ac..786d01720 100644 --- a/Source/include/semphr.h +++ b/Source/include/semphr.h @@ -47,6 +47,10 @@ licensing and training services. */ +#ifndef INC_FREERTOS_H + #error "#include FreeRTOS.h" must appear in source files before "#include semphr.h" +#endif + #ifndef SEMAPHORE_H #define SEMAPHORE_H diff --git a/Source/include/task.h b/Source/include/task.h index 808fd95ee..60193cfb7 100644 --- a/Source/include/task.h +++ b/Source/include/task.h @@ -47,11 +47,12 @@ licensing and training services. */ -/* -Changes since V4.3.1: - + Added xTaskGetSchedulerState() function. -*/ +#ifndef INC_FREERTOS_H + #error "#include FreeRTOS.h" must appear in source files before "#include task.h" +#endif + + #ifndef TASK_H #define TASK_H -- 2.39.5