]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/task.h
Final tidy up before tagging V8.2.3.
[freertos] / FreeRTOS / Source / include / task.h
index 12fc1980b5e4149acd179c21a96076851d94bb22..b8d6dd89094179130a8ddcfac6ccda5bd341be98 100644 (file)
@@ -1,60 +1,64 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 \r
-    ***************************************************************************\r
-     *                                                                       *\r
-     *    FreeRTOS provides completely free yet professionally developed,    *\r
-     *    robust, strictly quality controlled, supported, and cross          *\r
-     *    platform software that has become a de facto standard.             *\r
-     *                                                                       *\r
-     *    Help yourself get started quickly and support the FreeRTOS         *\r
-     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
-     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
-     *                                                                       *\r
-     *    Thank you!                                                         *\r
-     *                                                                       *\r
-    ***************************************************************************\r
-\r
     This file is part of the FreeRTOS distribution.\r
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\r
     the terms of the GNU General Public License (version 2) as published by the\r
-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+    Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+    ***************************************************************************\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
-    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
     link: http://www.freertos.org/a00114.html\r
 \r
-    1 tab == 4 spaces!\r
-\r
     ***************************************************************************\r
      *                                                                       *\r
-     *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?"                                     *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
      *                                                                       *\r
-     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
-    license and Real Time Engineers Ltd. contact details.\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
+\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
+\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
-    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
-    licenses offer ticketed support, indemnification and middleware.\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
 \r
     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
     engineered and independently SIL3 certified version for use in safety and\r
@@ -81,19 +85,28 @@ extern "C" {
  * MACROS AND DEFINITIONS\r
  *----------------------------------------------------------*/\r
 \r
-#define tskKERNEL_VERSION_NUMBER "V7.6.0"\r
+#define tskKERNEL_VERSION_NUMBER "V8.2.3"\r
+#define tskKERNEL_VERSION_MAJOR 8\r
+#define tskKERNEL_VERSION_MINOR 2\r
+#define tskKERNEL_VERSION_BUILD 3\r
 \r
 /**\r
  * task. h\r
  *\r
  * Type by which tasks are referenced.  For example, a call to xTaskCreate\r
- * returns (via a pointer parameter) an xTaskHandle variable that can then\r
+ * returns (via a pointer parameter) an TaskHandle_t variable that can then\r
  * be used as a parameter to vTaskDelete to delete the task.\r
  *\r
- * \defgroup xTaskHandle xTaskHandle\r
+ * \defgroup TaskHandle_t TaskHandle_t\r
  * \ingroup Tasks\r
  */\r
-typedef void * xTaskHandle;\r
+typedef void * TaskHandle_t;\r
+\r
+/*\r
+ * Defines the prototype to which the application task hook function must\r
+ * conform.\r
+ */\r
+typedef BaseType_t (*TaskHookFunction_t)( void * );\r
 \r
 /* Task states returned by eTaskGetState. */\r
 typedef enum\r
@@ -105,14 +118,24 @@ typedef enum
        eDeleted                /* The task being queried has been deleted, but its TCB has not yet been freed. */\r
 } eTaskState;\r
 \r
+/* Actions that can be performed when vTaskNotify() is called. */\r
+typedef enum\r
+{\r
+       eNoAction = 0,                          /* Notify the task without updating its notify value. */\r
+       eSetBits,                                       /* Set bits in the task's notification value. */\r
+       eIncrement,                                     /* Increment the task's notification value. */\r
+       eSetValueWithOverwrite,         /* Set the task's notification value to a specific value even if the previous value has not yet been read by the task. */\r
+       eSetValueWithoutOverwrite       /* Set the task's notification value if the previous value has been read by the task. */\r
+} eNotifyAction;\r
+\r
 /*\r
  * Used internally only.\r
  */\r
 typedef struct xTIME_OUT\r
 {\r
-       portBASE_TYPE xOverflowCount;\r
-       portTickType  xTimeOnEntering;\r
-} xTimeOutType;\r
+       BaseType_t xOverflowCount;\r
+       TickType_t xTimeOnEntering;\r
+} TimeOut_t;\r
 \r
 /*\r
  * Defines the memory ranges allocated to the task when an MPU is used.\r
@@ -120,37 +143,37 @@ typedef struct xTIME_OUT
 typedef struct xMEMORY_REGION\r
 {\r
        void *pvBaseAddress;\r
-       unsigned long ulLengthInBytes;\r
-       unsigned long ulParameters;\r
-} xMemoryRegion;\r
+       uint32_t ulLengthInBytes;\r
+       uint32_t ulParameters;\r
+} MemoryRegion_t;\r
 \r
 /*\r
  * Parameters required to create an MPU protected task.\r
  */\r
 typedef struct xTASK_PARAMETERS\r
 {\r
-       pdTASK_CODE pvTaskCode;\r
+       TaskFunction_t pvTaskCode;\r
        const char * const pcName;      /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
-       unsigned short usStackDepth;\r
+       uint16_t usStackDepth;\r
        void *pvParameters;\r
-       unsigned portBASE_TYPE uxPriority;\r
-       portSTACK_TYPE *puxStackBuffer;\r
-       xMemoryRegion xRegions[ portNUM_CONFIGURABLE_REGIONS ];\r
-} xTaskParameters;\r
+       UBaseType_t uxPriority;\r
+       StackType_t *puxStackBuffer;\r
+       MemoryRegion_t xRegions[ portNUM_CONFIGURABLE_REGIONS ];\r
+} TaskParameters_t;\r
 \r
 /* Used with the uxTaskGetSystemState() function to return the state of each task\r
 in the system. */\r
 typedef struct xTASK_STATUS\r
 {\r
-       xTaskHandle xHandle;                                            /* The handle of the task to which the rest of the information in the structure relates. */\r
-       const char *pcTaskName;                                         /* A pointer to the task's name.  This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
-       unsigned portBASE_TYPE xTaskNumber;                     /* A number unique to the task. */\r
-       eTaskState eCurrentState;                                       /* The state in which the task existed when the structure was populated. */\r
-       unsigned portBASE_TYPE uxCurrentPriority;       /* The priority at which the task was running (may be inherited) when the structure was populated. */\r
-       unsigned portBASE_TYPE uxBasePriority;          /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex.  Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */\r
-       unsigned long ulRunTimeCounter;                         /* The total run time allocated to the task so far, as defined by the run time stats clock.  See http://www.freertos.org/rtos-run-time-stats.html.  Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */\r
-       unsigned short usStackHighWaterMark;            /* The minimum amount of stack space that has remained for the task since the task was created.  The closer this value is to zero the closer the task has come to overflowing its stack. */\r
-} xTaskStatusType;\r
+       TaskHandle_t xHandle;                   /* The handle of the task to which the rest of the information in the structure relates. */\r
+       const char *pcTaskName;                 /* A pointer to the task's name.  This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+       UBaseType_t xTaskNumber;                /* A number unique to the task. */\r
+       eTaskState eCurrentState;               /* The state in which the task existed when the structure was populated. */\r
+       UBaseType_t uxCurrentPriority;  /* The priority at which the task was running (may be inherited) when the structure was populated. */\r
+       UBaseType_t uxBasePriority;             /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex.  Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */\r
+       uint32_t ulRunTimeCounter;              /* The total run time allocated to the task so far, as defined by the run time stats clock.  See http://www.freertos.org/rtos-run-time-stats.html.  Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */\r
+       uint16_t usStackHighWaterMark;  /* The minimum amount of stack space that has remained for the task since the task was created.  The closer this value is to zero the closer the task has come to overflowing its stack. */\r
+} TaskStatus_t;\r
 \r
 /* Possible return values for eTaskConfirmSleepModeStatus(). */\r
 typedef enum\r
@@ -166,7 +189,7 @@ typedef enum
  *\r
  * \ingroup TaskUtils\r
  */\r
-#define tskIDLE_PRIORITY                       ( ( unsigned portBASE_TYPE ) 0U )\r
+#define tskIDLE_PRIORITY                       ( ( UBaseType_t ) 0U )\r
 \r
 /**\r
  * task. h\r
@@ -191,6 +214,7 @@ typedef enum
  * \ingroup SchedulerControl\r
  */\r
 #define taskENTER_CRITICAL()           portENTER_CRITICAL()\r
+#define taskENTER_CRITICAL_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()\r
 \r
 /**\r
  * task. h\r
@@ -205,7 +229,7 @@ typedef enum
  * \ingroup SchedulerControl\r
  */\r
 #define taskEXIT_CRITICAL()                    portEXIT_CRITICAL()\r
-\r
+#define taskEXIT_CRITICAL_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( x )\r
 /**\r
  * task. h\r
  *\r
@@ -229,9 +253,9 @@ typedef enum
 /* Definitions returned by xTaskGetSchedulerState().  taskSCHEDULER_SUSPENDED is\r
 0 to generate more optimal code when configASSERT() is defined as the constant\r
 is used in assert() statements. */\r
-#define taskSCHEDULER_SUSPENDED                ( ( portBASE_TYPE ) 0 )\r
-#define taskSCHEDULER_NOT_STARTED      ( ( portBASE_TYPE ) 1 )\r
-#define taskSCHEDULER_RUNNING          ( ( portBASE_TYPE ) 2 )\r
+#define taskSCHEDULER_SUSPENDED                ( ( BaseType_t ) 0 )\r
+#define taskSCHEDULER_NOT_STARTED      ( ( BaseType_t ) 1 )\r
+#define taskSCHEDULER_RUNNING          ( ( BaseType_t ) 2 )\r
 \r
 \r
 /*-----------------------------------------------------------\r
@@ -241,13 +265,13 @@ is used in assert() statements. */
 /**\r
  * task. h\r
  *<pre>\r
portBASE_TYPE xTaskCreate(\r
-                                                         pdTASK_CODE pvTaskCode,\r
BaseType_t xTaskCreate(\r
+                                                         TaskFunction_t pvTaskCode,\r
                                                          const char * const pcName,\r
-                                                         unsigned short usStackDepth,\r
+                                                         uint16_t usStackDepth,\r
                                                          void *pvParameters,\r
-                                                         unsigned portBASE_TYPE uxPriority,\r
-                                                         xTaskHandle *pvCreatedTask\r
+                                                         UBaseType_t uxPriority,\r
+                                                         TaskHandle_t *pvCreatedTask\r
                                                  );</pre>\r
  *\r
  * Create a new task and add it to the list of tasks that are ready to run.\r
@@ -298,8 +322,8 @@ is used in assert() statements. */
  // Function that creates a task.\r
  void vOtherFunction( void )\r
  {\r
- static unsigned char ucParameterToPass;\r
xTaskHandle xHandle = NULL;\r
+ static uint8_t ucParameterToPass;\r
TaskHandle_t xHandle = NULL;\r
 \r
         // Create the task, storing the handle.  Note that the passed parameter ucParameterToPass\r
         // must exist for the lifetime of the task, so in this case is declared static.  If it was just an\r
@@ -323,7 +347,7 @@ is used in assert() statements. */
 /**\r
  * task. h\r
  *<pre>\r
portBASE_TYPE xTaskCreateRestricted( xTaskParameters *pxTaskDefinition, xTaskHandle *pxCreatedTask );</pre>\r
BaseType_t xTaskCreateRestricted( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask );</pre>\r
  *\r
  * xTaskCreateRestricted() should only be used in systems that include an MPU\r
  * implementation.\r
@@ -345,8 +369,8 @@ is used in assert() statements. */
  *\r
  * Example usage:\r
    <pre>\r
-// Create an xTaskParameters structure that defines the task to be created.\r
-static const xTaskParameters xCheckTaskParameters =\r
+// Create an TaskParameters_t structure that defines the task to be created.\r
+static const TaskParameters_t xCheckTaskParameters =\r
 {\r
        vATask,         // pvTaskCode - the function that implements the task.\r
        "ATask",        // pcName - just a text name for the task to assist debugging.\r
@@ -369,7 +393,7 @@ static const xTaskParameters xCheckTaskParameters =
 \r
 int main( void )\r
 {\r
-xTaskHandle xHandle;\r
+TaskHandle_t xHandle;\r
 \r
        // Create a task from the const structure defined above.  The task handle\r
        // is requested (the second parameter is not NULL) but in this case just for\r
@@ -392,7 +416,7 @@ xTaskHandle xHandle;
 /**\r
  * task. h\r
  *<pre>\r
- void vTaskAllocateMPURegions( xTaskHandle xTask, const xMemoryRegion * const pxRegions );</pre>\r
+ void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions );</pre>\r
  *\r
  * Memory regions are assigned to a restricted task when the task is created by\r
  * a call to xTaskCreateRestricted().  These regions can be redefined using\r
@@ -400,16 +424,16 @@ xTaskHandle xHandle;
  *\r
  * @param xTask The handle of the task being updated.\r
  *\r
- * @param xRegions A pointer to an xMemoryRegion structure that contains the\r
+ * @param xRegions A pointer to an MemoryRegion_t structure that contains the\r
  * new memory region definitions.\r
  *\r
  * Example usage:\r
    <pre>\r
-// Define an array of xMemoryRegion structures that configures an MPU region\r
+// Define an array of MemoryRegion_t structures that configures an MPU region\r
 // allowing read/write access for 1024 bytes starting at the beginning of the\r
 // ucOneKByte array.  The other two of the maximum 3 definable regions are\r
 // unused so set to zero.\r
-static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
+static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
 {\r
        // Base address         Length          Parameters\r
        { ucOneKByte,           1024,           portMPU_REGION_READ_WRITE },\r
@@ -435,11 +459,11 @@ void vATask( void *pvParameters )
  * \defgroup xTaskCreateRestricted xTaskCreateRestricted\r
  * \ingroup Tasks\r
  */\r
-void vTaskAllocateMPURegions( xTaskHandle xTask, const xMemoryRegion * const pxRegions ) PRIVILEGED_FUNCTION;\r
+void vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskDelete( xTaskHandle xTask );</pre>\r
+ * <pre>void vTaskDelete( TaskHandle_t xTask );</pre>\r
  *\r
  * INCLUDE_vTaskDelete must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -464,7 +488,7 @@ void vTaskAllocateMPURegions( xTaskHandle xTask, const xMemoryRegion * const pxR
    <pre>\r
  void vOtherFunction( void )\r
  {\r
xTaskHandle xHandle;\r
TaskHandle_t xHandle;\r
 \r
         // Create the task, storing the handle.\r
         xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );\r
@@ -476,7 +500,7 @@ void vTaskAllocateMPURegions( xTaskHandle xTask, const xMemoryRegion * const pxR
  * \defgroup vTaskDelete vTaskDelete\r
  * \ingroup Tasks\r
  */\r
-void vTaskDelete( xTaskHandle xTaskToDelete ) PRIVILEGED_FUNCTION;\r
+void vTaskDelete( TaskHandle_t xTaskToDelete ) PRIVILEGED_FUNCTION;\r
 \r
 /*-----------------------------------------------------------\r
  * TASK CONTROL API\r
@@ -484,11 +508,11 @@ void vTaskDelete( xTaskHandle xTaskToDelete ) PRIVILEGED_FUNCTION;
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskDelay( const portTickType xTicksToDelay );</pre>\r
+ * <pre>void vTaskDelay( const TickType_t xTicksToDelay );</pre>\r
  *\r
  * Delay a task for a given number of ticks.  The actual time that the\r
  * task remains blocked depends on the tick rate.  The constant\r
- * portTICK_RATE_MS can be used to calculate real time from the tick\r
+ * portTICK_PERIOD_MS can be used to calculate real time from the tick\r
  * rate - with the resolution of one tick period.\r
  *\r
  * INCLUDE_vTaskDelay must be defined as 1 for this function to be available.\r
@@ -515,7 +539,7 @@ void vTaskDelete( xTaskHandle xTaskToDelete ) PRIVILEGED_FUNCTION;
  void vTaskFunction( void * pvParameters )\r
  {\r
  // Block for 500ms.\r
- const portTickType xDelay = 500 / portTICK_RATE_MS;\r
+ const TickType_t xDelay = 500 / portTICK_PERIOD_MS;\r
 \r
         for( ;; )\r
         {\r
@@ -528,11 +552,11 @@ void vTaskDelete( xTaskHandle xTaskToDelete ) PRIVILEGED_FUNCTION;
  * \defgroup vTaskDelay vTaskDelay\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskDelay( const portTickType xTicksToDelay ) PRIVILEGED_FUNCTION;\r
+void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskDelayUntil( portTickType *pxPreviousWakeTime, const portTickType xTimeIncrement );</pre>\r
+ * <pre>void vTaskDelayUntil( TickType_t *pxPreviousWakeTime, const TickType_t xTimeIncrement );</pre>\r
  *\r
  * INCLUDE_vTaskDelayUntil must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -552,7 +576,7 @@ void vTaskDelay( const portTickType xTicksToDelay ) PRIVILEGED_FUNCTION;
  * is called, vTaskDelayUntil () specifies the absolute (exact) time at which it wishes to\r
  * unblock.\r
  *\r
- * The constant portTICK_RATE_MS can be used to calculate real time from the tick\r
+ * The constant portTICK_PERIOD_MS can be used to calculate real time from the tick\r
  * rate - with the resolution of one tick period.\r
  *\r
  * @param pxPreviousWakeTime Pointer to a variable that holds the time at which the\r
@@ -570,8 +594,8 @@ void vTaskDelay( const portTickType xTicksToDelay ) PRIVILEGED_FUNCTION;
  // Perform an action every 10 ticks.\r
  void vTaskFunction( void * pvParameters )\r
  {\r
portTickType xLastWakeTime;\r
- const portTickType xFrequency = 10;\r
TickType_t xLastWakeTime;\r
+ const TickType_t xFrequency = 10;\r
 \r
         // Initialise the xLastWakeTime variable with the current time.\r
         xLastWakeTime = xTaskGetTickCount ();\r
@@ -587,11 +611,11 @@ void vTaskDelay( const portTickType xTicksToDelay ) PRIVILEGED_FUNCTION;
  * \defgroup vTaskDelayUntil vTaskDelayUntil\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskDelayUntil( portTickType * const pxPreviousWakeTime, const portTickType xTimeIncrement ) PRIVILEGED_FUNCTION;\r
+void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>unsigned portBASE_TYPE uxTaskPriorityGet( xTaskHandle xTask );</pre>\r
+ * <pre>UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask );</pre>\r
  *\r
  * INCLUDE_uxTaskPriorityGet must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -607,7 +631,7 @@ void vTaskDelayUntil( portTickType * const pxPreviousWakeTime, const portTickTyp
    <pre>\r
  void vAFunction( void )\r
  {\r
xTaskHandle xHandle;\r
TaskHandle_t xHandle;\r
 \r
         // Create a task, storing the handle.\r
         xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );\r
@@ -634,11 +658,19 @@ void vTaskDelayUntil( portTickType * const pxPreviousWakeTime, const portTickTyp
  * \defgroup uxTaskPriorityGet uxTaskPriorityGet\r
  * \ingroup TaskCtrl\r
  */\r
-unsigned portBASE_TYPE uxTaskPriorityGet( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>eTaskState eTaskGetState( xTaskHandle xTask );</pre>\r
+ * <pre>UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );</pre>\r
+ *\r
+ * A version of uxTaskPriorityGet() that can be used from an ISR.\r
+ */\r
+UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
+\r
+/**\r
+ * task. h\r
+ * <pre>eTaskState eTaskGetState( TaskHandle_t xTask );</pre>\r
  *\r
  * INCLUDE_eTaskGetState must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -652,11 +684,11 @@ unsigned portBASE_TYPE uxTaskPriorityGet( xTaskHandle xTask ) PRIVILEGED_FUNCTIO
  * state of the task might change between the function being called, and the\r
  * functions return value being tested by the calling task.\r
  */\r
-eTaskState eTaskGetState( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+eTaskState eTaskGetState( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskPrioritySet( xTaskHandle xTask, unsigned portBASE_TYPE uxNewPriority );</pre>\r
+ * <pre>void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority );</pre>\r
  *\r
  * INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -675,7 +707,7 @@ eTaskState eTaskGetState( xTaskHandle xTask ) PRIVILEGED_FUNCTION;
    <pre>\r
  void vAFunction( void )\r
  {\r
xTaskHandle xHandle;\r
TaskHandle_t xHandle;\r
 \r
         // Create a task, storing the handle.\r
         xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );\r
@@ -694,11 +726,11 @@ eTaskState eTaskGetState( xTaskHandle xTask ) PRIVILEGED_FUNCTION;
  * \defgroup vTaskPrioritySet vTaskPrioritySet\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskPrioritySet( xTaskHandle xTask, unsigned portBASE_TYPE uxNewPriority ) PRIVILEGED_FUNCTION;\r
+void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskSuspend( xTaskHandle xTaskToSuspend );</pre>\r
+ * <pre>void vTaskSuspend( TaskHandle_t xTaskToSuspend );</pre>\r
  *\r
  * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -717,7 +749,7 @@ void vTaskPrioritySet( xTaskHandle xTask, unsigned portBASE_TYPE uxNewPriority )
    <pre>\r
  void vAFunction( void )\r
  {\r
xTaskHandle xHandle;\r
TaskHandle_t xHandle;\r
 \r
         // Create a task, storing the handle.\r
         xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );\r
@@ -745,11 +777,11 @@ void vTaskPrioritySet( xTaskHandle xTask, unsigned portBASE_TYPE uxNewPriority )
  * \defgroup vTaskSuspend vTaskSuspend\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskSuspend( xTaskHandle xTaskToSuspend ) PRIVILEGED_FUNCTION;\r
+void vTaskSuspend( TaskHandle_t xTaskToSuspend ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskResume( xTaskHandle xTaskToResume );</pre>\r
+ * <pre>void vTaskResume( TaskHandle_t xTaskToResume );</pre>\r
  *\r
  * INCLUDE_vTaskSuspend must be defined as 1 for this function to be available.\r
  * See the configuration section for more information.\r
@@ -766,7 +798,7 @@ void vTaskSuspend( xTaskHandle xTaskToSuspend ) PRIVILEGED_FUNCTION;
    <pre>\r
  void vAFunction( void )\r
  {\r
xTaskHandle xHandle;\r
TaskHandle_t xHandle;\r
 \r
         // Create a task, storing the handle.\r
         xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle );\r
@@ -794,11 +826,11 @@ void vTaskSuspend( xTaskHandle xTaskToSuspend ) PRIVILEGED_FUNCTION;
  * \defgroup vTaskResume vTaskResume\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskResume( xTaskHandle xTaskToResume ) PRIVILEGED_FUNCTION;\r
+void vTaskResume( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <pre>void xTaskResumeFromISR( xTaskHandle xTaskToResume );</pre>\r
+ * <pre>void xTaskResumeFromISR( TaskHandle_t xTaskToResume );</pre>\r
  *\r
  * INCLUDE_xTaskResumeFromISR must be defined as 1 for this function to be\r
  * available.  See the configuration section for more information.\r
@@ -823,7 +855,7 @@ void vTaskResume( xTaskHandle xTaskToResume ) PRIVILEGED_FUNCTION;
  * \defgroup vTaskResumeFromISR vTaskResumeFromISR\r
  * \ingroup TaskCtrl\r
  */\r
-portBASE_TYPE xTaskResumeFromISR( xTaskHandle xTaskToResume ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskResumeFromISR( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;\r
 \r
 /*-----------------------------------------------------------\r
  * SCHEDULER CONTROL\r
@@ -967,7 +999,7 @@ void vTaskSuspendAll( void ) PRIVILEGED_FUNCTION;
 \r
 /**\r
  * task. h\r
- * <pre>char xTaskResumeAll( void );</pre>\r
+ * <pre>BaseType_t xTaskResumeAll( void );</pre>\r
  *\r
  * Resumes scheduler activity after it was suspended by a call to\r
  * vTaskSuspendAll().\r
@@ -1017,18 +1049,7 @@ void vTaskSuspendAll( void ) PRIVILEGED_FUNCTION;
  * \defgroup xTaskResumeAll xTaskResumeAll\r
  * \ingroup SchedulerControl\r
  */\r
-signed portBASE_TYPE xTaskResumeAll( void ) PRIVILEGED_FUNCTION;\r
-\r
-/**\r
- * task. h\r
- * <pre>signed portBASE_TYPE xTaskIsTaskSuspended( const xTaskHandle xTask );</pre>\r
- *\r
- * Utility task that simply returns pdTRUE if the task referenced by xTask is\r
- * currently in the Suspended state, or pdFALSE if the task referenced by xTask\r
- * is in any other state.\r
- *\r
- */\r
-signed portBASE_TYPE xTaskIsTaskSuspended( const xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskResumeAll( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*-----------------------------------------------------------\r
  * TASK UTILITIES\r
@@ -1036,34 +1057,34 @@ signed portBASE_TYPE xTaskIsTaskSuspended( const xTaskHandle xTask ) PRIVILEGED_
 \r
 /**\r
  * task. h\r
- * <PRE>portTickType xTaskGetTickCount( void );</PRE>\r
+ * <PRE>TickType_t xTaskGetTickCount( void );</PRE>\r
  *\r
  * @return The count of ticks since vTaskStartScheduler was called.\r
  *\r
  * \defgroup xTaskGetTickCount xTaskGetTickCount\r
  * \ingroup TaskUtils\r
  */\r
-portTickType xTaskGetTickCount( void ) PRIVILEGED_FUNCTION;\r
+TickType_t xTaskGetTickCount( void ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <PRE>portTickType xTaskGetTickCountFromISR( void );</PRE>\r
+ * <PRE>TickType_t xTaskGetTickCountFromISR( void );</PRE>\r
  *\r
  * @return The count of ticks since vTaskStartScheduler was called.\r
  *\r
  * This is a version of xTaskGetTickCount() that is safe to be called from an\r
- * ISR - provided that portTickType is the natural word size of the\r
+ * ISR - provided that TickType_t is the natural word size of the\r
  * microcontroller being used or interrupt nesting is either not supported or\r
  * not being used.\r
  *\r
  * \defgroup xTaskGetTickCountFromISR xTaskGetTickCountFromISR\r
  * \ingroup TaskUtils\r
  */\r
-portTickType xTaskGetTickCountFromISR( void ) PRIVILEGED_FUNCTION;\r
+TickType_t xTaskGetTickCountFromISR( void ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <PRE>unsigned short uxTaskGetNumberOfTasks( void );</PRE>\r
+ * <PRE>uint16_t uxTaskGetNumberOfTasks( void );</PRE>\r
  *\r
  * @return The number of tasks that the real time kernel is currently managing.\r
  * This includes all ready, blocked and suspended tasks.  A task that\r
@@ -1073,11 +1094,11 @@ portTickType xTaskGetTickCountFromISR( void ) PRIVILEGED_FUNCTION;
  * \defgroup uxTaskGetNumberOfTasks uxTaskGetNumberOfTasks\r
  * \ingroup TaskUtils\r
  */\r
-unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;\r
+UBaseType_t uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
- * <PRE>char *pcTaskGetTaskName( xTaskHandle xTaskToQuery );</PRE>\r
+ * <PRE>char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery );</PRE>\r
  *\r
  * @return The text (human readable) name of the task referenced by the handle\r
  * xTaskToQuery.  A task can query its own name by either passing in its own\r
@@ -1087,11 +1108,11 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
  * \defgroup pcTaskGetTaskName pcTaskGetTaskName\r
  * \ingroup TaskUtils\r
  */\r
-char *pcTaskGetTaskName( xTaskHandle xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 \r
 /**\r
  * task.h\r
- * <PRE>unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask );</PRE>\r
+ * <PRE>UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask );</PRE>\r
  *\r
  * INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for\r
  * this function to be available.\r
@@ -1108,10 +1129,10 @@ char *pcTaskGetTaskName( xTaskHandle xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint
  * actual spaces on the stack rather than bytes) since the task referenced by\r
  * xTask was created.\r
  */\r
-unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
 \r
 /* When using trace macros it is sometimes necessary to include task.h before\r
-FreeRTOS.h.  When this is done pdTASK_HOOK_CODE will not yet have been defined,\r
+FreeRTOS.h.  When this is done TaskHookFunction_t 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
@@ -1120,27 +1141,39 @@ constant. */
        #if configUSE_APPLICATION_TASK_TAG == 1\r
                /**\r
                 * task.h\r
-                * <pre>void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );</pre>\r
+                * <pre>void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t 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
+               void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ) PRIVILEGED_FUNCTION;\r
 \r
                /**\r
                 * task.h\r
-                * <pre>void xTaskGetApplicationTaskTag( xTaskHandle xTask );</pre>\r
+                * <pre>void xTaskGetApplicationTaskTag( TaskHandle_t xTask );</pre>\r
                 *\r
                 * Returns the pxHookFunction value assigned to the task xTask.\r
                 */\r
-               pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+               TaskHookFunction_t xTaskGetApplicationTaskTag( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
        #endif /* configUSE_APPLICATION_TASK_TAG ==1 */\r
 #endif /* ifdef configUSE_APPLICATION_TASK_TAG */\r
 \r
+#if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )\r
+\r
+       /* Each task contains an array of pointers that is dimensioned by the\r
+       configNUM_THREAD_LOCAL_STORAGE_POINTERS setting in FreeRTOSConfig.h.  The\r
+       kernel does not use the pointers itself, so the application writer can use\r
+       the pointers for any purpose they wish.  The following two functions are\r
+       used to set and query a pointer respectively. */\r
+       void vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue ) PRIVILEGED_FUNCTION;\r
+       void *pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex ) PRIVILEGED_FUNCTION;\r
+\r
+#endif\r
+\r
 /**\r
  * task.h\r
- * <pre>portBASE_TYPE xTaskCallApplicationTaskHook( xTaskHandle xTask, void *pvParameter );</pre>\r
+ * <pre>BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );</pre>\r
  *\r
  * Calls the hook function associated with xTask.  Passing xTask as NULL has\r
  * the effect of calling the Running tasks (the calling task) hook function.\r
@@ -1149,7 +1182,7 @@ constant. */
  * wants.  The return value is the value returned by the task hook function\r
  * registered by the user.\r
  */\r
-portBASE_TYPE xTaskCallApplicationTaskHook( xTaskHandle xTask, void *pvParameter ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * xTaskGetIdleTaskHandle() is only available if\r
@@ -1158,29 +1191,29 @@ portBASE_TYPE xTaskCallApplicationTaskHook( xTaskHandle xTask, void *pvParameter
  * Simply returns the handle of the idle task.  It is not valid to call\r
  * xTaskGetIdleTaskHandle() before the scheduler has been started.\r
  */\r
-xTaskHandle xTaskGetIdleTaskHandle( void );\r
+TaskHandle_t xTaskGetIdleTaskHandle( void ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for\r
  * uxTaskGetSystemState() to be available.\r
  *\r
- * uxTaskGetSystemState() populates an xTaskStatusType structure for each task in\r
- * the system.  xTaskStatusType structures contain, among other things, members\r
+ * uxTaskGetSystemState() populates an TaskStatus_t structure for each task in\r
+ * the system.  TaskStatus_t structures contain, among other things, members\r
  * for the task handle, task name, task priority, task state, and total amount\r
- * of run time consumed by the task.  See the xTaskStatusType structure\r
+ * of run time consumed by the task.  See the TaskStatus_t structure\r
  * definition in this file for the full member list.\r
  *\r
  * NOTE:  This function is intended for debugging use only as its use results in\r
  * the scheduler remaining suspended for an extended period.\r
  *\r
- * @param pxTaskStatusArray A pointer to an array of xTaskStatusType structures.\r
- * The array must contain at least one xTaskStatusType structure for each task\r
+ * @param pxTaskStatusArray A pointer to an array of TaskStatus_t structures.\r
+ * The array must contain at least one TaskStatus_t structure for each task\r
  * that is under the control of the RTOS.  The number of tasks under the control\r
  * of the RTOS can be determined using the uxTaskGetNumberOfTasks() API function.\r
  *\r
  * @param uxArraySize The size of the array pointed to by the pxTaskStatusArray\r
  * parameter.  The size is specified as the number of indexes in the array, or\r
- * the number of xTaskStatusType structures contained in the array, not by the\r
+ * the number of TaskStatus_t structures contained in the array, not by the\r
  * number of bytes in the array.\r
  *\r
  * @param pulTotalRunTime If configGENERATE_RUN_TIME_STATS is set to 1 in\r
@@ -1189,7 +1222,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
  * http://www.freertos.org/rtos-run-time-stats.html) since the target booted.\r
  * pulTotalRunTime can be set to NULL to omit the total run time information.\r
  *\r
- * @return The number of xTaskStatusType structures that were populated by\r
+ * @return The number of TaskStatus_t structures that were populated by\r
  * uxTaskGetSystemState().  This should equal the number returned by the\r
  * uxTaskGetNumberOfTasks() API function, but will be zero if the value passed\r
  * in the uxArraySize parameter was too small.\r
@@ -1201,9 +1234,9 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
        // The human readable table is written to pcWriteBuffer\r
        void vTaskGetRunTimeStats( char *pcWriteBuffer )\r
        {\r
-       xTaskStatusType *pxTaskStatusArray;\r
-       volatile unsigned portBASE_TYPE uxArraySize, x;\r
-       unsigned long ulTotalRunTime, ulStatsAsPercentage;\r
+       TaskStatus_t *pxTaskStatusArray;\r
+       volatile UBaseType_t uxArraySize, x;\r
+       uint32_t ulTotalRunTime, ulStatsAsPercentage;\r
 \r
                // Make sure the write buffer does not contain a string.\r
                *pcWriteBuffer = 0x00;\r
@@ -1212,9 +1245,9 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
                // function is executing.\r
                uxArraySize = uxTaskGetNumberOfTasks();\r
 \r
-               // Allocate a xTaskStatusType structure for each task.  An array could be\r
+               // Allocate a TaskStatus_t structure for each task.  An array could be\r
                // allocated statically at compile time.\r
-               pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( xTaskStatusType ) );\r
+               pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );\r
 \r
                if( pxTaskStatusArray != NULL )\r
                {\r
@@ -1257,7 +1290,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
        }\r
        </pre>\r
  */\r
-unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType * const pxTaskStatusArray, const unsigned portBASE_TYPE uxArraySize, unsigned long * const pulTotalRunTime );\r
+UBaseType_t uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
@@ -1360,6 +1393,441 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unquali
  */\r
 void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 \r
+/**\r
+ * task. h\r
+ * <PRE>BaseType_t xTaskNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction );</PRE>\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this\r
+ * function to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * A notification sent to a task will remain pending until it is cleared by the\r
+ * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was\r
+ * already in the Blocked state to wait for a notification when the notification\r
+ * arrives then the task will automatically be removed from the Blocked state\r
+ * (unblocked) and the notification cleared.\r
+ *\r
+ * A task can use xTaskNotifyWait() to [optionally] block to wait for a\r
+ * notification to be pending, or ulTaskNotifyTake() to [optionally] block\r
+ * to wait for its notification value to have a non-zero value.  The task does\r
+ * not consume any CPU time while it is in the Blocked state.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.\r
+ *\r
+ * @param xTaskToNotify The handle of the task being notified.  The handle to a\r
+ * task can be returned from the xTaskCreate() API function used to create the\r
+ * task, and the handle of the currently running task can be obtained by calling\r
+ * xTaskGetCurrentTaskHandle().\r
+ *\r
+ * @param ulValue Data that can be sent with the notification.  How the data is\r
+ * used depends on the value of the eAction parameter.\r
+ *\r
+ * @param eAction Specifies how the notification updates the task's notification\r
+ * value, if at all.  Valid values for eAction are as follows:\r
+ *\r
+ * eSetBits -\r
+ * The task's notification value is bitwise ORed with ulValue.  xTaskNofify()\r
+ * always returns pdPASS in this case.\r
+ *\r
+ * eIncrement -\r
+ * The task's notification value is incremented.  ulValue is not used and\r
+ * xTaskNotify() always returns pdPASS in this case.\r
+ *\r
+ * eSetValueWithOverwrite -\r
+ * The task's notification value is set to the value of ulValue, even if the\r
+ * task being notified had not yet processed the previous notification (the\r
+ * task already had a notification pending).  xTaskNotify() always returns\r
+ * pdPASS in this case.\r
+ *\r
+ * eSetValueWithoutOverwrite -\r
+ * If the task being notified did not already have a notification pending then\r
+ * the task's notification value is set to ulValue and xTaskNotify() will\r
+ * return pdPASS.  If the task being notified already had a notification\r
+ * pending then no action is performed and pdFAIL is returned.\r
+ *\r
+ * eNoAction -\r
+ * The task receives a notification without its notification value being\r
+ * updated.  ulValue is not used and xTaskNotify() always returns pdPASS in\r
+ * this case.\r
+ *\r
+ *  pulPreviousNotificationValue -\r
+ *  Can be used to pass out the subject task's notification value before any\r
+ *  bits are modified by the notify function.\r
+ *\r
+ * @return Dependent on the value of eAction.  See the description of the\r
+ * eAction parameter.\r
+ *\r
+ * \defgroup xTaskNotify xTaskNotify\r
+ * \ingroup TaskNotifications\r
+ */\r
+BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) PRIVILEGED_FUNCTION;\r
+#define xTaskNotify( xTaskToNotify, ulValue, eAction ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL )\r
+#define xTaskNotifyAndQuery( xTaskToNotify, ulValue, eAction, pulPreviousNotifyValue ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) )\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>BaseType_t xTaskNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, BaseType_t *pxHigherPriorityTaskWoken );</PRE>\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this\r
+ * function to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * A version of xTaskNotify() that can be used from an interrupt service routine\r
+ * (ISR).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * A notification sent to a task will remain pending until it is cleared by the\r
+ * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was\r
+ * already in the Blocked state to wait for a notification when the notification\r
+ * arrives then the task will automatically be removed from the Blocked state\r
+ * (unblocked) and the notification cleared.\r
+ *\r
+ * A task can use xTaskNotifyWait() to [optionally] block to wait for a\r
+ * notification to be pending, or ulTaskNotifyTake() to [optionally] block\r
+ * to wait for its notification value to have a non-zero value.  The task does\r
+ * not consume any CPU time while it is in the Blocked state.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.\r
+ *\r
+ * @param xTaskToNotify The handle of the task being notified.  The handle to a\r
+ * task can be returned from the xTaskCreate() API function used to create the\r
+ * task, and the handle of the currently running task can be obtained by calling\r
+ * xTaskGetCurrentTaskHandle().\r
+ *\r
+ * @param ulValue Data that can be sent with the notification.  How the data is\r
+ * used depends on the value of the eAction parameter.\r
+ *\r
+ * @param eAction Specifies how the notification updates the task's notification\r
+ * value, if at all.  Valid values for eAction are as follows:\r
+ *\r
+ * eSetBits -\r
+ * The task's notification value is bitwise ORed with ulValue.  xTaskNofify()\r
+ * always returns pdPASS in this case.\r
+ *\r
+ * eIncrement -\r
+ * The task's notification value is incremented.  ulValue is not used and\r
+ * xTaskNotify() always returns pdPASS in this case.\r
+ *\r
+ * eSetValueWithOverwrite -\r
+ * The task's notification value is set to the value of ulValue, even if the\r
+ * task being notified had not yet processed the previous notification (the\r
+ * task already had a notification pending).  xTaskNotify() always returns\r
+ * pdPASS in this case.\r
+ *\r
+ * eSetValueWithoutOverwrite -\r
+ * If the task being notified did not already have a notification pending then\r
+ * the task's notification value is set to ulValue and xTaskNotify() will\r
+ * return pdPASS.  If the task being notified already had a notification\r
+ * pending then no action is performed and pdFAIL is returned.\r
+ *\r
+ * eNoAction -\r
+ * The task receives a notification without its notification value being\r
+ * updated.  ulValue is not used and xTaskNotify() always returns pdPASS in\r
+ * this case.\r
+ *\r
+ * @param pxHigherPriorityTaskWoken  xTaskNotifyFromISR() will set\r
+ * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the\r
+ * task to which the notification was sent to leave the Blocked state, and the\r
+ * unblocked task has a priority higher than the currently running task.  If\r
+ * xTaskNotifyFromISR() sets this value to pdTRUE then a context switch should\r
+ * be requested before the interrupt is exited.  How a context switch is\r
+ * requested from an ISR is dependent on the port - see the documentation page\r
+ * for the port in use.\r
+ *\r
+ * @return Dependent on the value of eAction.  See the description of the\r
+ * eAction parameter.\r
+ *\r
+ * \defgroup xTaskNotify xTaskNotify\r
+ * \ingroup TaskNotifications\r
+ */\r
+BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;\r
+#define xTaskNotifyFromISR( xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )\r
+#define xTaskNotifyAndQueryFromISR( xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) )\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait );</pre>\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this\r
+ * function to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * A notification sent to a task will remain pending until it is cleared by the\r
+ * task calling xTaskNotifyWait() or ulTaskNotifyTake().  If the task was\r
+ * already in the Blocked state to wait for a notification when the notification\r
+ * arrives then the task will automatically be removed from the Blocked state\r
+ * (unblocked) and the notification cleared.\r
+ *\r
+ * A task can use xTaskNotifyWait() to [optionally] block to wait for a\r
+ * notification to be pending, or ulTaskNotifyTake() to [optionally] block\r
+ * to wait for its notification value to have a non-zero value.  The task does\r
+ * not consume any CPU time while it is in the Blocked state.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.\r
+ *\r
+ * @param ulBitsToClearOnEntry Bits that are set in ulBitsToClearOnEntry value\r
+ * will be cleared in the calling task's notification value before the task\r
+ * checks to see if any notifications are pending, and optionally blocks if no\r
+ * notifications are pending.  Setting ulBitsToClearOnEntry to ULONG_MAX (if\r
+ * limits.h is included) or 0xffffffffUL (if limits.h is not included) will have\r
+ * the effect of resetting the task's notification value to 0.  Setting\r
+ * ulBitsToClearOnEntry to 0 will leave the task's notification value unchanged.\r
+ *\r
+ * @param ulBitsToClearOnExit If a notification is pending or received before\r
+ * the calling task exits the xTaskNotifyWait() function then the task's\r
+ * notification value (see the xTaskNotify() API function) is passed out using\r
+ * the pulNotificationValue parameter.  Then any bits that are set in\r
+ * ulBitsToClearOnExit will be cleared in the task's notification value (note\r
+ * *pulNotificationValue is set before any bits are cleared).  Setting\r
+ * ulBitsToClearOnExit to ULONG_MAX (if limits.h is included) or 0xffffffffUL\r
+ * (if limits.h is not included) will have the effect of resetting the task's\r
+ * notification value to 0 before the function exits.  Setting\r
+ * ulBitsToClearOnExit to 0 will leave the task's notification value unchanged\r
+ * when the function exits (in which case the value passed out in\r
+ * pulNotificationValue will match the task's notification value).\r
+ *\r
+ * @param pulNotificationValue Used to pass the task's notification value out\r
+ * of the function.  Note the value passed out will not be effected by the\r
+ * clearing of any bits caused by ulBitsToClearOnExit being non-zero.\r
+ *\r
+ * @param xTicksToWait The maximum amount of time that the task should wait in\r
+ * the Blocked state for a notification to be received, should a notification\r
+ * not already be pending when xTaskNotifyWait() was called.  The task\r
+ * will not consume any processing time while it is in the Blocked state.  This\r
+ * is specified in kernel ticks, the macro pdMS_TO_TICSK( value_in_ms ) can be\r
+ * used to convert a time specified in milliseconds to a time specified in\r
+ * ticks.\r
+ *\r
+ * @return If a notification was received (including notifications that were\r
+ * already pending when xTaskNotifyWait was called) then pdPASS is\r
+ * returned.  Otherwise pdFAIL is returned.\r
+ *\r
+ * \defgroup xTaskNotifyWait xTaskNotifyWait\r
+ * \ingroup TaskNotifications\r
+ */\r
+BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>BaseType_t xTaskNotifyGive( TaskHandle_t xTaskToNotify );</PRE>\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this macro\r
+ * to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * xTaskNotifyGive() is a helper macro intended for use when task notifications\r
+ * are used as light weight and faster binary or counting semaphore equivalents.\r
+ * Actual FreeRTOS semaphores are given using the xSemaphoreGive() API function,\r
+ * the equivalent action that instead uses a task notification is\r
+ * xTaskNotifyGive().\r
+ *\r
+ * When task notifications are being used as a binary or counting semaphore\r
+ * equivalent then the task being notified should wait for the notification\r
+ * using the ulTaskNotificationTake() API function rather than the\r
+ * xTaskNotifyWait() API function.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for more details.\r
+ *\r
+ * @param xTaskToNotify The handle of the task being notified.  The handle to a\r
+ * task can be returned from the xTaskCreate() API function used to create the\r
+ * task, and the handle of the currently running task can be obtained by calling\r
+ * xTaskGetCurrentTaskHandle().\r
+ *\r
+ * @return xTaskNotifyGive() is a macro that calls xTaskNotify() with the\r
+ * eAction parameter set to eIncrement - so pdPASS is always returned.\r
+ *\r
+ * \defgroup xTaskNotifyGive xTaskNotifyGive\r
+ * \ingroup TaskNotifications\r
+ */\r
+#define xTaskNotifyGive( xTaskToNotify ) xTaskGenericNotify( ( xTaskToNotify ), ( 0 ), eIncrement, NULL )\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>void vTaskNotifyGiveFromISR( TaskHandle_t xTaskHandle, BaseType_t *pxHigherPriorityTaskWoken );\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this macro\r
+ * to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * A version of xTaskNotifyGive() that can be called from an interrupt service\r
+ * routine (ISR).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * vTaskNotifyGiveFromISR() is intended for use when task notifications are\r
+ * used as light weight and faster binary or counting semaphore equivalents.\r
+ * Actual FreeRTOS semaphores are given from an ISR using the\r
+ * xSemaphoreGiveFromISR() API function, the equivalent action that instead uses\r
+ * a task notification is vTaskNotifyGiveFromISR().\r
+ *\r
+ * When task notifications are being used as a binary or counting semaphore\r
+ * equivalent then the task being notified should wait for the notification\r
+ * using the ulTaskNotificationTake() API function rather than the\r
+ * xTaskNotifyWait() API function.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for more details.\r
+ *\r
+ * @param xTaskToNotify The handle of the task being notified.  The handle to a\r
+ * task can be returned from the xTaskCreate() API function used to create the\r
+ * task, and the handle of the currently running task can be obtained by calling\r
+ * xTaskGetCurrentTaskHandle().\r
+ *\r
+ * @param pxHigherPriorityTaskWoken  vTaskNotifyGiveFromISR() will set\r
+ * *pxHigherPriorityTaskWoken to pdTRUE if sending the notification caused the\r
+ * task to which the notification was sent to leave the Blocked state, and the\r
+ * unblocked task has a priority higher than the currently running task.  If\r
+ * vTaskNotifyGiveFromISR() sets this value to pdTRUE then a context switch\r
+ * should be requested before the interrupt is exited.  How a context switch is\r
+ * requested from an ISR is dependent on the port - see the documentation page\r
+ * for the port in use.\r
+ *\r
+ * \defgroup xTaskNotifyWait xTaskNotifyWait\r
+ * \ingroup TaskNotifications\r
+ */\r
+void vTaskNotifyGiveFromISR( TaskHandle_t xTaskToNotify, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait );</pre>\r
+ *\r
+ * configUSE_TASK_NOTIFICATIONS must be undefined or defined as 1 for this\r
+ * function to be available.\r
+ *\r
+ * When configUSE_TASK_NOTIFICATIONS is set to one each task has its own private\r
+ * "notification value", which is a 32-bit unsigned integer (uint32_t).\r
+ *\r
+ * Events can be sent to a task using an intermediary object.  Examples of such\r
+ * objects are queues, semaphores, mutexes and event groups.  Task notifications\r
+ * are a method of sending an event directly to a task without the need for such\r
+ * an intermediary object.\r
+ *\r
+ * A notification sent to a task can optionally perform an action, such as\r
+ * update, overwrite or increment the task's notification value.  In that way\r
+ * task notifications can be used to send data to a task, or be used as light\r
+ * weight and fast binary or counting semaphores.\r
+ *\r
+ * ulTaskNotifyTake() is intended for use when a task notification is used as a\r
+ * faster and lighter weight binary or counting semaphore alternative.  Actual\r
+ * FreeRTOS semaphores are taken using the xSemaphoreTake() API function, the\r
+ * equivalent action that instead uses a task notification is\r
+ * ulTaskNotifyTake().\r
+ *\r
+ * When a task is using its notification value as a binary or counting semaphore\r
+ * other tasks should send notifications to it using the xTaskNotifyGive()\r
+ * macro, or xTaskNotify() function with the eAction parameter set to\r
+ * eIncrement.\r
+ *\r
+ * ulTaskNotifyTake() can either clear the task's notification value to\r
+ * zero on exit, in which case the notification value acts like a binary\r
+ * semaphore, or decrement the task's notification value on exit, in which case\r
+ * the notification value acts like a counting semaphore.\r
+ *\r
+ * A task can use ulTaskNotifyTake() to [optionally] block to wait for a\r
+ * the task's notification value to be non-zero.  The task does not consume any\r
+ * CPU time while it is in the Blocked state.\r
+ *\r
+ * Where as xTaskNotifyWait() will return when a notification is pending,\r
+ * ulTaskNotifyTake() will return when the task's notification value is\r
+ * not zero.\r
+ *\r
+ * See http://www.FreeRTOS.org/RTOS-task-notifications.html for details.\r
+ *\r
+ * @param xClearCountOnExit if xClearCountOnExit is pdFALSE then the task's\r
+ * notification value is decremented when the function exits.  In this way the\r
+ * notification value acts like a counting semaphore.  If xClearCountOnExit is\r
+ * not pdFALSE then the task's notification value is cleared to zero when the\r
+ * function exits.  In this way the notification value acts like a binary\r
+ * semaphore.\r
+ *\r
+ * @param xTicksToWait The maximum amount of time that the task should wait in\r
+ * the Blocked state for the task's notification value to be greater than zero,\r
+ * should the count not already be greater than zero when\r
+ * ulTaskNotifyTake() was called.  The task will not consume any processing\r
+ * time while it is in the Blocked state.  This is specified in kernel ticks,\r
+ * the macro pdMS_TO_TICSK( value_in_ms ) can be used to convert a time\r
+ * specified in milliseconds to a time specified in ticks.\r
+ *\r
+ * @return The task's notification count before it is either cleared to zero or\r
+ * decremented (see the xClearCountOnExit parameter).\r
+ *\r
+ * \defgroup ulTaskNotifyTake ulTaskNotifyTake\r
+ * \ingroup TaskNotifications\r
+ */\r
+uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;\r
+\r
+/**\r
+ * task. h\r
+ * <PRE>BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );</pre>\r
+ *\r
+ * If the notification state of the task referenced by the handle xTask is\r
+ * eNotified, then set the task's notification state to eNotWaitingNotification.\r
+ * The task's notification value is not altered.  Set xTask to NULL to clear the\r
+ * notification state of the calling task.\r
+ *\r
+ * @return pdTRUE if the task's notification state was set to\r
+ * eNotWaitingNotification, otherwise pdFALSE.\r
+ * \defgroup xTaskNotifyStateClear xTaskNotifyStateClear\r
+ * \ingroup TaskNotifications\r
+ */\r
+BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );\r
+\r
 /*-----------------------------------------------------------\r
  * SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES\r
  *----------------------------------------------------------*/\r
@@ -1379,7 +1847,7 @@ void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e9
  *   + Time slicing is in use and there is a task of equal priority to the\r
  *     currently running task.\r
  */\r
-portBASE_TYPE xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN\r
@@ -1409,11 +1877,11 @@ portBASE_TYPE xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;
  *\r
  * @param xTicksToWait The maximum amount of time that the task should wait\r
  * for the event to occur.  This is specified in kernel ticks,the constant\r
- * portTICK_RATE_MS can be used to convert kernel ticks into a real time\r
+ * portTICK_PERIOD_MS can be used to convert kernel ticks into a real time\r
  * period.\r
  */\r
-void vTaskPlaceOnEventList( xList * const pxEventList, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;\r
-void vTaskPlaceOnUnorderedEventList( xList * pxEventList, const portTickType xItemValue, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;\r
+void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;\r
+void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN\r
@@ -1426,7 +1894,7 @@ void vTaskPlaceOnUnorderedEventList( xList * pxEventList, const portTickType xIt
  * indefinitely, whereas vTaskPlaceOnEventList() does.\r
  *\r
  */\r
-void vTaskPlaceOnEventListRestricted( xList * const pxEventList, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;\r
+void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS AN\r
@@ -1452,8 +1920,8 @@ void vTaskPlaceOnEventListRestricted( xList * const pxEventList, const portTickT
  * @return pdTRUE if the task being removed has a higher priority than the task\r
  * making the call, otherwise pdFALSE.\r
  */\r
-signed portBASE_TYPE xTaskRemoveFromEventList( const xList * const pxEventList ) PRIVILEGED_FUNCTION;\r
-signed portBASE_TYPE xTaskRemoveFromUnorderedEventList( xListItem * pxEventListItem, const portTickType xItemValue ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem, const TickType_t xItemValue ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE.  IT IS ONLY\r
@@ -1469,23 +1937,23 @@ void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION;
  * THESE FUNCTIONS MUST NOT BE USED FROM APPLICATION CODE.  THEY ARE USED BY\r
  * THE EVENT BITS MODULE.\r
  */\r
-portTickType uxTaskResetEventItemValue( void ) PRIVILEGED_FUNCTION;\r
+TickType_t uxTaskResetEventItemValue( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Return the handle of the calling task.\r
  */\r
-xTaskHandle xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;\r
+TaskHandle_t xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Capture the current time status for future reference.\r
  */\r
-void vTaskSetTimeOutState( xTimeOutType * const pxTimeOut ) PRIVILEGED_FUNCTION;\r
+void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Compare the time status now with that previously captured to see if the\r
  * timeout has expired.\r
  */\r
-portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType * const pxTimeOut, portTickType * const pxTicksToWait ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Shortcut used by the queue implementation to prevent unnecessary call to\r
@@ -1497,36 +1965,36 @@ void vTaskMissedYield( void ) PRIVILEGED_FUNCTION;
  * Returns the scheduler state as taskSCHEDULER_RUNNING,\r
  * taskSCHEDULER_NOT_STARTED or taskSCHEDULER_SUSPENDED.\r
  */\r
-portBASE_TYPE xTaskGetSchedulerState( void ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskGetSchedulerState( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Raises the priority of the mutex holder to that of the calling task should\r
  * the mutex holder have a priority less than the calling task.\r
  */\r
-void vTaskPriorityInherit( xTaskHandle const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
+void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Set the priority of a task back to its proper priority in the case that it\r
  * inherited a higher priority while it was holding a semaphore.\r
  */\r
-void vTaskPriorityDisinherit( xTaskHandle const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Generic version of the task creation function which is in turn called by the\r
  * xTaskCreate() and xTaskCreateRestricted() macros.\r
  */\r
-signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 \r
 /*\r
  * Get the uxTCBNumber assigned to the task referenced by the xTask parameter.\r
  */\r
-unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask ) PRIVILEGED_FUNCTION;\r
+UBaseType_t uxTaskGetTaskNumber( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Set the uxTaskNumber of the task referenced by the xTask parameter to\r
  * uxHandle.\r
  */\r
-void vTaskSetTaskNumber( xTaskHandle xTask, const unsigned portBASE_TYPE uxHandle ) PRIVILEGED_FUNCTION;\r
+void vTaskSetTaskNumber( TaskHandle_t xTask, const UBaseType_t uxHandle ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Only available when configUSE_TICKLESS_IDLE is set to 1.\r
@@ -1536,7 +2004,7 @@ void vTaskSetTaskNumber( xTaskHandle xTask, const unsigned portBASE_TYPE uxHandl
  * to date with the actual execution time by being skipped forward by a time\r
  * equal to the idle period.\r
  */\r
-void vTaskStepTick( const portTickType xTicksToJump ) PRIVILEGED_FUNCTION;\r
+void vTaskStepTick( const TickType_t xTicksToJump ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Only avilable when configUSE_TICKLESS_IDLE is set to 1.\r
@@ -1554,6 +2022,12 @@ void vTaskStepTick( const portTickType xTicksToJump ) PRIVILEGED_FUNCTION;
  */\r
 eSleepModeStatus eTaskConfirmSleepModeStatus( void ) PRIVILEGED_FUNCTION;\r
 \r
+/*\r
+ * For internal use only.  Increment the mutex held count when a mutex is\r
+ * taken and return the handle of the task that has taken the mutex.\r
+ */\r
+void *pvTaskIncrementMutexHeldCount( void ) PRIVILEGED_FUNCTION;\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r