From 36322def892e92b770bb2d979e15e9d31b79e38c Mon Sep 17 00:00:00 2001
From: Our Air Quality <info@ourairquality.org>
Date: Wed, 13 Dec 2017 21:15:41 +1100
Subject: [PATCH] FreeRTOS v10 fixes.

svn r2522:
FreeRTOS kernel: Fix extern "C" { in stream_buffer.h.
FreeRTOS kernel: Correct tskKERNEL_VERSION_NUMBER and tskKERNEL_VERSION_MAJOR constants for V10.
Ensure the currently executing task is printed correctly in vTaskList().
---
 FreeRTOS/Source/include/stream_buffer.h | 6 +++++-
 FreeRTOS/Source/include/task.h          | 4 ++--
 FreeRTOS/Source/tasks.c                 | 4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/FreeRTOS/Source/include/stream_buffer.h b/FreeRTOS/Source/include/stream_buffer.h
index 55c6e6e..2ca9c6d 100644
--- a/FreeRTOS/Source/include/stream_buffer.h
+++ b/FreeRTOS/Source/include/stream_buffer.h
@@ -52,6 +52,10 @@
 #ifndef STREAM_BUFFER_H
 #define STREAM_BUFFER_H
 
+#if defined( __cplusplus )
+extern "C" {
+#endif
+
 /**
  * Type by which stream buffers are referenced.  For example, a call to
  * xStreamBufferCreate() returns an StreamBufferHandle_t variable that can
@@ -843,7 +847,7 @@ StreamBufferHandle_t xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
 #endif
 
 #if defined( __cplusplus )
-extern "C" {
+}
 #endif
 
 #endif	/* !defined( STREAM_BUFFER_H ) */
diff --git a/FreeRTOS/Source/include/task.h b/FreeRTOS/Source/include/task.h
index ca6866e..ae7097d 100644
--- a/FreeRTOS/Source/include/task.h
+++ b/FreeRTOS/Source/include/task.h
@@ -44,8 +44,8 @@ extern "C" {
  * MACROS AND DEFINITIONS
  *----------------------------------------------------------*/
 
-#define tskKERNEL_VERSION_NUMBER "V9.0.0"
-#define tskKERNEL_VERSION_MAJOR 9
+#define tskKERNEL_VERSION_NUMBER "V10.0.0"
+#define tskKERNEL_VERSION_MAJOR 10
 #define tskKERNEL_VERSION_MINOR 0
 #define tskKERNEL_VERSION_BUILD 0
 
diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c
index f191614..5484046 100644
--- a/FreeRTOS/Source/tasks.c
+++ b/FreeRTOS/Source/tasks.c
@@ -110,6 +110,7 @@ set then don't fill the stack so there is no unnecessary dependency on memset. *
 /*
  * Macros used by vListTask to indicate which state a task is in.
  */
+#define tskRUNNING_CHAR		( 'X' )
 #define tskBLOCKED_CHAR		( 'B' )
 #define tskREADY_CHAR		( 'R' )
 #define tskDELETED_CHAR		( 'D' )
@@ -4209,6 +4210,9 @@ TCB_t *pxTCB;
 			{
 				switch( pxTaskStatusArray[ x ].eCurrentState )
 				{
+					case eRunning:		cStatus = tskRUNNING_CHAR;
+										break;
+
 					case eReady:		cStatus = tskREADY_CHAR;
 										break;