\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
* 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
*/\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