]> git.sur5r.net Git - freertos/blobdiff - Source/include/task.h
Remove unnecessary ';' characters from a couple of macro definitions in the IAR MSP43...
[freertos] / Source / include / task.h
index 6b882682fa77b921265cee6487994d65e8f4f98f..0c9f70fd1b4e4bfd761a6579b233fdd8412edae4 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V6.0.5 - Copyright (C) 2010 Real Time Engineers Ltd.\r
+    FreeRTOS V6.1.0 - Copyright (C) 2010 Real Time Engineers Ltd.\r
 \r
     ***************************************************************************\r
     *                                                                         *\r
@@ -10,7 +10,7 @@
     *    + Looking for basic training,                                        *\r
     *    + Wanting to improve your FreeRTOS skills and productivity           *\r
     *                                                                         *\r
-    * then take a look at the FreeRTOS eBook                                  *\r
+    * then take a look at the FreeRTOS books - available as PDF or paperback  *\r
     *                                                                         *\r
     *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
     *                  http://www.FreeRTOS.org/Documentation                  *\r
@@ -53,7 +53,7 @@
 \r
 \r
 #ifndef INC_FREERTOS_H\r
-       #error "#include FreeRTOS.h" must appear in source files before "#include task.h"\r
+       #error "include FreeRTOS.h must appear in source files before include task.h"\r
 #endif\r
 \r
 \r
@@ -72,7 +72,7 @@ extern "C" {
  * MACROS AND DEFINITIONS\r
  *----------------------------------------------------------*/\r
 \r
-#define tskKERNEL_VERSION_NUMBER "V6.0.5"\r
+#define tskKERNEL_VERSION_NUMBER "V6.1.0"\r
 \r
 /**\r
  * task. h\r
@@ -1102,9 +1102,9 @@ unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;
  * this function to be available.\r
  *\r
  * Returns the high water mark of the stack associated with xTask.  That is,\r
- * the minimum free stack space there has been (in bytes) since the task\r
- * started.  The smaller the returned number the closer the task has come\r
- * to overflowing its stack.\r
+ * the minimum free stack space there has been (in words, so on a 32 bit machine\r
+ * a value of 1 means 4 bytes) since the task started.  The smaller the returned \r
+ * number the closer the task has come to overflowing its stack.\r
  *\r
  * @param xTask Handle of the task associated with the stack to be checked.\r
  * Set xTask to NULL to check the stack of the calling task.\r
@@ -1114,23 +1114,33 @@ unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;
  */\r
 unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
 \r
-/**\r
- * task.h\r
- * <pre>void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );</pre>\r
- *\r
- * Sets pxHookFunction to be the task hook function used by the task xTask.\r
- * Passing xTask as NULL has the effect of setting the calling tasks hook\r
- * function.\r
- */\r
-void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction ) PRIVILEGED_FUNCTION;\r
-\r
-/**\r
- * task.h\r
- * <pre>void xTaskGetApplicationTaskTag( xTaskHandle xTask );</pre>\r
- *\r
- * Returns the pxHookFunction value assigned to the task xTask.\r
- */\r
-pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+/* When using trace macros it is sometimes necessary to include tasks.h before\r
+FreeRTOS.h.  When this is done pdTASK_HOOK_CODE will not yet have been defined,\r
+so the following two prototypes will cause a compilation error.  This can be\r
+fixed by simply guarding against the inclusion of these two prototypes unless\r
+they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration\r
+constant. */\r
+#ifdef configUSE_APPLICATION_TASK_TAG\r
+       #if configUSE_APPLICATION_TASK_TAG == 1\r
+               /**\r
+                * task.h\r
+                * <pre>void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );</pre>\r
+                *\r
+                * Sets pxHookFunction to be the task hook function used by the task xTask.\r
+                * Passing xTask as NULL has the effect of setting the calling tasks hook\r
+                * function.\r
+                */\r
+               void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction ) PRIVILEGED_FUNCTION;\r
+\r
+               /**\r
+                * task.h\r
+                * <pre>void xTaskGetApplicationTaskTag( xTaskHandle xTask );</pre>\r
+                *\r
+                * Returns the pxHookFunction value assigned to the task xTask.\r
+                */\r
+               pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+       #endif /* configUSE_APPLICATION_TASK_TAG ==1 */\r
+#endif /* ifdef configUSE_APPLICATION_TASK_TAG */\r
 \r
 /**\r
  * task.h\r