From 28629a7ea63a7da56ac0eda313dbc130e10f5bf2 Mon Sep 17 00:00:00 2001
From: Richard Barry <ribarry@amazon.com>
Date: Sun, 7 Aug 2011 10:22:20 +0000
Subject: [PATCH] Update the names of some of the newly introduced API
 functions so they are more consistent with the names of pre-existing API
 functions.

---
 Source/include/FreeRTOS.h | 12 ++++++++----
 Source/include/task.h     | 17 +++++++++--------
 Source/include/timers.h   |  9 +++++----
 3 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/Source/include/FreeRTOS.h b/Source/include/FreeRTOS.h
index ffed4cbed..88a711c59 100644
--- a/Source/include/FreeRTOS.h
+++ b/Source/include/FreeRTOS.h
@@ -134,12 +134,16 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
 	#error Missing definition:  configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
 #endif
 
-#ifndef INCLUDE_xTaskGetIdleTaskHandle
-	#define INCLUDE_xTaskGetIdleTaskHandle 0
+#ifndef INCLUDE_xTaskIdleTaskHandleGet
+	#define INCLUDE_xTaskIdleTaskHandleGet 0
 #endif
 
-#ifndef INCLUDE_xTimerGetTimerTaskHandle
-	#define INCLUDE_xTimerGetTimerTaskHandle 0
+#ifndef INCLUDE_xTimerDaemonTaskHandleGet
+	#define INCLUDE_xTimerDaemonTaskHandleGet 0
+#endif
+
+#ifndef INCLUDE_pcTaskNameGet
+	#define INCLUDE_pcTaskNameGet 0
 #endif
 
 #ifndef configUSE_APPLICATION_TASK_TAG
diff --git a/Source/include/task.h b/Source/include/task.h
index 01c2a584f..44950ee45 100644
--- a/Source/include/task.h
+++ b/Source/include/task.h
@@ -1007,16 +1007,17 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
 
 /**
  * task. h
- * <PRE>signed char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );</PRE>
+ * <PRE>signed char *pcTaskNameGet( xTaskHandle xTaskToQuery );</PRE>
  *
  * @return The text (human readable) name of the task referenced by the handle
  * xTaskToQueury.  A task can query its own name by either passing in its own
- * handle, or by setting xTaskToQuery to NULL.
+ * handle, or by setting xTaskToQuery to NULL.  INCLUDE_pcTaskNameGet must be
+ * set to 1 in FreeRTOSConfig.h for pcTaskNameGet() to be available.
  *
- * \page pcTaskGetTaskName pcTaskGetTaskName
+ * \page pcTaskNameGet pcTasknameGet
  * \ingroup TaskUtils
  */
-signed char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );
+signed char *pcTaskNameGet( xTaskHandle xTaskToQuery );
 
 /**
  * task. h
@@ -1171,13 +1172,13 @@ constant. */
 portBASE_TYPE xTaskCallApplicationTaskHook( xTaskHandle xTask, void *pvParameter ) PRIVILEGED_FUNCTION;
 
 /**
- * xTaskGetIdleTaskHandle() is only available if 
- * INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSConfig.h.
+ * xTaskIdleTaskHandleGet() is only available if 
+ * INCLUDE_xTaskIdleTaskHandleGet is set to 1 in FreeRTOSConfig.h.
  *
  * Simply returns the handle of the idle task.  It is not valid to call
- * xTaskGetIdleTaskHandle() before the scheduler has been started.
+ * xTaskIdleTaskHandleGet() before the scheduler has been started.
  */
-xTaskHandle xTaskGetIdleTaskHandle( void );
+xTaskHandle xTaskIdleTaskHandleGet( void );
 
 /*-----------------------------------------------------------
  * SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES
diff --git a/Source/include/timers.h b/Source/include/timers.h
index 578f05b43..849f04892 100644
--- a/Source/include/timers.h
+++ b/Source/include/timers.h
@@ -67,6 +67,7 @@
 
 #include "portable.h"
 #include "list.h"
+#include "task.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -284,13 +285,13 @@ void *pvTimerGetTimerID( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
 portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
 
 /**
- * xTimerGetTimerTaskHandle() is only available if 
- * INCLUDE_xTimerGetTimerTaskHandle is set to 1 in FreeRTOSConfig.h.
+ * xTimerDaemonTaskHandleGet() is only available if 
+ * INCLUDE_xTimerDaemonTaskHandleGet is set to 1 in FreeRTOSConfig.h.
  *
  * Simply returns the handle of the timer service/daemon task.  It it not valid
- * to call xTimerGetTimerTaskHandle() before the scheduler has been started.
+ * to call xTimerDaemonTaskHandleGet() before the scheduler has been started.
  */
-xTaskHandle xTimerGetTimerTaskHandle( void );
+xTaskHandle xTimerDaemonTaskHandleGet( void );
 
 /**
  * portBASE_TYPE xTimerStart( xTimerHandle xTimer, portTickType xBlockTime );