]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/task.h
Update to MIT licensed FreeRTOS V10.0.0 - see https://www.freertos.org/History.txt
[freertos] / FreeRTOS / Source / include / task.h
index 7af7a2e76af200572a5bf8c83d42428106236051..f2db393d74ba3cc891fc750a9c6ef93e0d9ab15d 100644 (file)
@@ -1,71 +1,30 @@
 /*\r
-    FreeRTOS V9.0.0rc1 - Copyright (C) 2016 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
-    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
-\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 on the following\r
-    link: http://www.freertos.org/a00114.html\r
-\r
-    ***************************************************************************\r
-     *                                                                       *\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
-     *    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/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.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
-    mission critical applications that require provable dependability.\r
-\r
-    1 tab == 4 spaces!\r
-*/\r
+ * FreeRTOS Kernel V10.0.0\r
+ * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
+ * this software and associated documentation files (the "Software"), to deal in\r
+ * the Software without restriction, including without limitation the rights to\r
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
+ * the Software, and to permit persons to whom the Software is furnished to do so,\r
+ * subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in all\r
+ * copies or substantial portions of the Software. If you wish to use our Amazon\r
+ * FreeRTOS name, please do so in a fair use way that does not cause confusion.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ *\r
+ * http://www.FreeRTOS.org\r
+ * http://aws.amazon.com/freertos\r
+ *\r
+ * 1 tab == 4 spaces!\r
+ */\r
 \r
 \r
 #ifndef INC_TASK_H\r
@@ -85,7 +44,7 @@ extern "C" {
  * MACROS AND DEFINITIONS\r
  *----------------------------------------------------------*/\r
 \r
-#define tskKERNEL_VERSION_NUMBER "V9.0.0rc1"\r
+#define tskKERNEL_VERSION_NUMBER "V9.0.0"\r
 #define tskKERNEL_VERSION_MAJOR 9\r
 #define tskKERNEL_VERSION_MINOR 0\r
 #define tskKERNEL_VERSION_BUILD 0\r
@@ -160,6 +119,9 @@ typedef struct xTASK_PARAMETERS
        UBaseType_t uxPriority;\r
        StackType_t *puxStackBuffer;\r
        MemoryRegion_t xRegions[ portNUM_CONFIGURABLE_REGIONS ];\r
+       #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )\r
+               StaticTask_t * const pxTaskBuffer;\r
+       #endif\r
 } TaskParameters_t;\r
 \r
 /* Used with the uxTaskGetSystemState() function to return the state of each task\r
@@ -269,7 +231,7 @@ is used in assert() statements. */
  BaseType_t xTaskCreate(\r
                                                          TaskFunction_t pvTaskCode,\r
                                                          const char * const pcName,\r
-                                                         uint16_t usStackDepth,\r
+                                                         configSTACK_DEPTH_TYPE usStackDepth,\r
                                                          void *pvParameters,\r
                                                          UBaseType_t uxPriority,\r
                                                          TaskHandle_t *pvCreatedTask\r
@@ -357,22 +319,24 @@ is used in assert() statements. */
  * \ingroup Tasks\r
  */\r
 #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
-       BaseType_t xTaskCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+       BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,\r
+                                                       const char * const pcName,      /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                       const configSTACK_DEPTH_TYPE usStackDepth,\r
+                                                       void * const pvParameters,\r
+                                                       UBaseType_t uxPriority,\r
+                                                       TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION;\r
 #endif\r
 \r
 /**\r
  * task. h\r
  *<pre>\r
- BaseType_t xTaskCreateStatic(\r
-                                                         TaskFunction_t pvTaskCode,\r
-                                                         const char * const pcName,\r
-                                                         uint16_t usStackDepth,\r
-                                                         void *pvParameters,\r
-                                                         UBaseType_t uxPriority,\r
-                                                         TaskHandle_t *pvCreatedTask,\r
-                                                         StackType_t *pxStackBuffer,\r
-                                                         StaticTask_t *pxTaskBuffer\r
-                                                 );</pre>\r
+ TaskHandle_t xTaskCreateStatic( TaskFunction_t pvTaskCode,\r
+                                                                const char * const pcName,\r
+                                                                uint32_t ulStackDepth,\r
+                                                                void *pvParameters,\r
+                                                                UBaseType_t uxPriority,\r
+                                                                StackType_t *pxStackBuffer,\r
+                                                                StaticTask_t *pxTaskBuffer );</pre>\r
  *\r
  * Create a new task and add it to the list of tasks that are ready to run.\r
  *\r
@@ -393,9 +357,9 @@ is used in assert() statements. */
  * facilitate debugging.  The maximum length of the string is defined by\r
  * configMAX_TASK_NAME_LEN in FreeRTOSConfig.h.\r
  *\r
- * @param usStackDepth The size of the task stack specified as the number of\r
+ * @param ulStackDepth The size of the task stack specified as the number of\r
  * variables the stack can hold - not the number of bytes.  For example, if\r
- * the stack is 32-bits wide and usStackDepth is defined as 100 then 400 bytes\r
+ * the stack is 32-bits wide and ulStackDepth is defined as 100 then 400 bytes\r
  * will be allocated for stack storage.\r
  *\r
  * @param pvParameters Pointer that will be used as the parameter for the task\r
@@ -403,11 +367,8 @@ is used in assert() statements. */
  *\r
  * @param uxPriority The priority at which the task will run.\r
  *\r
- * @param pvCreatedTask Used to pass back a handle by which the created task\r
- * can be referenced.  Pass as NULL if the handle is not required.\r
- *\r
  * @param pxStackBuffer Must point to a StackType_t array that has at least\r
- * usStackDepth indexes - the array will then be used as the task's stack,\r
+ * ulStackDepth indexes - the array will then be used as the task's stack,\r
  * removing the need for the stack to be allocated dynamically.\r
  *\r
  * @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will\r
@@ -416,55 +377,71 @@ is used in assert() statements. */
  *\r
  * @return If neither pxStackBuffer or pxTaskBuffer are NULL, then the task will\r
  * be created and pdPASS is returned.  If either pxStackBuffer or pxTaskBuffer\r
- * are NULL then the task will not be created and \r
+ * are NULL then the task will not be created and\r
  * errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY is returned.\r
  *\r
  * Example usage:\r
    <pre>\r
 \r
- // Dimensions the buffer that the task being created will use as its stack.\r
- // NOTE:  This is the number of words the stack will hold, not the number of\r
- // bytes.  For example, if each stack item is 32-bits, and this is set to 100,\r
- // then 400 bytes (100 * 32-bits) will be allocated.\r
- #define STACK_SIZE 200\r
-\r
- // Structure that will hold the TCB of the task being created.\r
- StaticTask_t xTaskBuffer;\r
-\r
- // Buffer that the task being created will use as its stack.\r
- StackType_t xStack[ STACK_SIZE ];\r
-\r
- // Task to be created.\r
- void vTaskCode( void * pvParameters )\r
- {\r
-        for( ;; )\r
-        {\r
-                // Task code goes here.\r
-        }\r
- }\r
-\r
- // Function that creates a task.\r
- void vOtherFunction( void )\r
- {\r
- static uint8_t ucParameterToPass;\r
- TaskHandle_t xHandle = NULL;\r
-\r
-        // Create the task without using any dynamic memory allocation.\r
-        xTaskCreateStatic( vTaskCode,          // As per xTaskCreate() parameter.\r
-                                       "NAME",             // As per xTaskCreate() parameter.\r
-                                       STACK_SIZE,         // As per xTaskCreate() parameter.\r
-                                       &ucParameterToPass, // As per xTaskCreate() parameter.\r
-                                       tskIDLE_PRIORITY,   // As per xTaskCreate() parameter.\r
-                                       &xHandle,           // As per xTaskCreate() parameter.\r
-                                       xStack,             // Pointer to the buffer that the task being created will use as its stack.\r
-                                       &xTaskBuffer );     // Pointer to a StaticTask_t structure for use as the memory require by the task.\r
- }\r
+    // Dimensions the buffer that the task being created will use as its stack.\r
+    // NOTE:  This is the number of words the stack will hold, not the number of\r
+    // bytes.  For example, if each stack item is 32-bits, and this is set to 100,\r
+    // then 400 bytes (100 * 32-bits) will be allocated.\r
+    #define STACK_SIZE 200\r
+\r
+    // Structure that will hold the TCB of the task being created.\r
+    StaticTask_t xTaskBuffer;\r
+\r
+    // Buffer that the task being created will use as its stack.  Note this is\r
+    // an array of StackType_t variables.  The size of StackType_t is dependent on\r
+    // the RTOS port.\r
+    StackType_t xStack[ STACK_SIZE ];\r
+\r
+    // Function that implements the task being created.\r
+    void vTaskCode( void * pvParameters )\r
+    {\r
+        // The parameter value is expected to be 1 as 1 is passed in the\r
+        // pvParameters value in the call to xTaskCreateStatic().\r
+        configASSERT( ( uint32_t ) pvParameters == 1UL );\r
+\r
+        for( ;; )\r
+        {\r
+            // Task code goes here.\r
+        }\r
+    }\r
+\r
+    // Function that creates a task.\r
+    void vOtherFunction( void )\r
+    {\r
+        TaskHandle_t xHandle = NULL;\r
+\r
+        // Create the task without using any dynamic memory allocation.\r
+        xHandle = xTaskCreateStatic(\r
+                      vTaskCode,       // Function that implements the task.\r
+                      "NAME",          // Text name for the task.\r
+                      STACK_SIZE,      // Stack size in words, not bytes.\r
+                      ( void * ) 1,    // Parameter passed into the task.\r
+                      tskIDLE_PRIORITY,// Priority at which the task is created.\r
+                      xStack,          // Array to use as the task's stack.\r
+                      &xTaskBuffer );  // Variable to hold the task's data structure.\r
+\r
+        // puxStackBuffer and pxTaskBuffer were not NULL, so the task will have\r
+        // been created, and xHandle will be the task's handle.  Use the handle\r
+        // to suspend the task.\r
+        vTaskSuspend( xHandle );\r
+    }\r
    </pre>\r
  * \defgroup xTaskCreateStatic xTaskCreateStatic\r
  * \ingroup Tasks\r
  */\r
 #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
-       BaseType_t xTaskCreateStatic( 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, StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+       TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,\r
+                                                                       const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                                       const uint32_t ulStackDepth,\r
+                                                                       void * const pvParameters,\r
+                                                                       UBaseType_t uxPriority,\r
+                                                                       StackType_t * const puxStackBuffer,\r
+                                                                       StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION;\r
 #endif /* configSUPPORT_STATIC_ALLOCATION */\r
 \r
 /**\r
@@ -472,6 +449,8 @@ is used in assert() statements. */
  *<pre>\r
  BaseType_t xTaskCreateRestricted( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask );</pre>\r
  *\r
+ * Only available when configSUPPORT_DYNAMIC_ALLOCATION is set to 1.\r
+ *\r
  * xTaskCreateRestricted() should only be used in systems that include an MPU\r
  * implementation.\r
  *\r
@@ -479,6 +458,9 @@ is used in assert() statements. */
  * The function parameters define the memory regions and associated access\r
  * permissions allocated to the task.\r
  *\r
+ * See xTaskCreateRestrictedStatic() for a version that does not use any\r
+ * dynamic memory allocation.\r
+ *\r
  * @param pxTaskDefinition Pointer to a structure that contains a member\r
  * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API\r
  * documentation) plus an optional stack buffer and the memory region\r
@@ -534,7 +516,97 @@ TaskHandle_t xHandle;
  * \defgroup xTaskCreateRestricted xTaskCreateRestricted\r
  * \ingroup Tasks\r
  */\r
-#define xTaskCreateRestricted( x, pxCreatedTask ) xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ( NULL ), ((x)->xRegions) )\r
+#if( portUSING_MPU_WRAPPERS == 1 )\r
+       BaseType_t xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask ) PRIVILEGED_FUNCTION;\r
+#endif\r
+\r
+/**\r
+ * task. h\r
+ *<pre>\r
+ BaseType_t xTaskCreateRestrictedStatic( TaskParameters_t *pxTaskDefinition, TaskHandle_t *pxCreatedTask );</pre>\r
+ *\r
+ * Only available when configSUPPORT_STATIC_ALLOCATION is set to 1.\r
+ *\r
+ * xTaskCreateRestrictedStatic() should only be used in systems that include an\r
+ * MPU implementation.\r
+ *\r
+ * Internally, within the FreeRTOS implementation, tasks use two blocks of\r
+ * memory.  The first block is used to hold the task's data structures.  The\r
+ * second block is used by the task as its stack.  If a task is created using\r
+ * xTaskCreateRestricted() then the stack is provided by the application writer,\r
+ * and the memory used to hold the task's data structure is automatically\r
+ * dynamically allocated inside the xTaskCreateRestricted() function.  If a task\r
+ * is created using xTaskCreateRestrictedStatic() then the application writer\r
+ * must provide the memory used to hold the task's data structures too.\r
+ * xTaskCreateRestrictedStatic() therefore allows a memory protected task to be\r
+ * created without using any dynamic memory allocation.\r
+ *\r
+ * @param pxTaskDefinition Pointer to a structure that contains a member\r
+ * for each of the normal xTaskCreate() parameters (see the xTaskCreate() API\r
+ * documentation) plus an optional stack buffer and the memory region\r
+ * definitions.  If configSUPPORT_STATIC_ALLOCATION is set to 1 the structure\r
+ * contains an additional member, which is used to point to a variable of type\r
+ * StaticTask_t - which is then used to hold the task's data structure.\r
+ *\r
+ * @param pxCreatedTask Used to pass back a handle by which the created task\r
+ * can be referenced.\r
+ *\r
+ * @return pdPASS if the task was successfully created and added to a ready\r
+ * list, otherwise an error code defined in the file projdefs.h\r
+ *\r
+ * Example usage:\r
+   <pre>\r
+// Create an TaskParameters_t structure that defines the task to be created.\r
+// The StaticTask_t variable is only included in the structure when\r
+// configSUPPORT_STATIC_ALLOCATION is set to 1.  The PRIVILEGED_DATA macro can\r
+// be used to force the variable into the RTOS kernel's privileged data area.\r
+static PRIVILEGED_DATA StaticTask_t xTaskBuffer;\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
+       100,            // usStackDepth - the stack size DEFINED IN WORDS.\r
+       NULL,           // pvParameters - passed into the task function as the function parameters.\r
+       ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.\r
+       cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.\r
+\r
+       // xRegions - Allocate up to three separate memory regions for access by\r
+       // the task, with appropriate access permissions.  Different processors have\r
+       // different memory alignment requirements - refer to the FreeRTOS documentation\r
+       // for full information.\r
+       {\r
+               // Base address                                 Length  Parameters\r
+        { cReadWriteArray,                             32,             portMPU_REGION_READ_WRITE },\r
+        { cReadOnlyArray,                              32,             portMPU_REGION_READ_ONLY },\r
+        { cPrivilegedOnlyAccessArray,  128,    portMPU_REGION_PRIVILEGED_READ_WRITE }\r
+       }\r
+\r
+       &xTaskBuffer; // Holds the task's data structure.\r
+};\r
+\r
+int main( void )\r
+{\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
+       // demonstration purposes as its not actually used.\r
+       xTaskCreateRestricted( &xRegTest1Parameters, &xHandle );\r
+\r
+       // Start the scheduler.\r
+       vTaskStartScheduler();\r
+\r
+       // Will only get here if there was insufficient memory to create the idle\r
+       // and/or timer task.\r
+       for( ;; );\r
+}\r
+   </pre>\r
+ * \defgroup xTaskCreateRestrictedStatic xTaskCreateRestrictedStatic\r
+ * \ingroup Tasks\r
+ */\r
+#if( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )\r
+       BaseType_t xTaskCreateRestrictedStatic( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask ) PRIVILEGED_FUNCTION;\r
+#endif\r
 \r
 /**\r
  * task. h\r
@@ -836,7 +908,7 @@ eTaskState eTaskGetState( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
 \r
 /**\r
  * task. h\r
- * <pre>void vTaskGetTaskInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );</pre>\r
+ * <pre>void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );</pre>\r
  *\r
  * configUSE_TRACE_FACILITY must be defined as 1 for this function to be\r
  * available.  See the configuration section for more information.\r
@@ -873,22 +945,22 @@ eTaskState eTaskGetState( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
  TaskStatus_t xTaskDetails;\r
 \r
     // Obtain the handle of a task from its name.\r
-    xHandle = xTaskGetTaskHandle( "Task_Name" );\r
+    xHandle = xTaskGetHandle( "Task_Name" );\r
 \r
     // Check the handle is not NULL.\r
     configASSERT( xHandle );\r
 \r
     // Use the handle to obtain further information about the task.\r
-    vTaskGetTaskInfo( xHandle,\r
-                      &xTaskDetails,\r
-                      pdTRUE, // Include the high water mark in xTaskDetails.\r
-                      eInvalid ); // Include the task state in xTaskDetails.\r
+    vTaskGetInfo( xHandle,\r
+                  &xTaskDetails,\r
+                  pdTRUE, // Include the high water mark in xTaskDetails.\r
+                  eInvalid ); // Include the task state in xTaskDetails.\r
  }\r
    </pre>\r
- * \defgroup vTaskGetTaskInfo vTaskGetTaskInfo\r
+ * \defgroup vTaskGetInfo vTaskGetInfo\r
  * \ingroup TaskCtrl\r
  */\r
-void vTaskGetTaskInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) PRIVILEGED_FUNCTION;\r
+void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) PRIVILEGED_FUNCTION;\r
 \r
 /**\r
  * task. h\r
@@ -1302,33 +1374,32 @@ UBaseType_t uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
 \r
 /**\r
  * task. h\r
- * <PRE>char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery );</PRE>\r
+ * <PRE>char *pcTaskGetName( 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
- * handle, or by setting xTaskToQuery to NULL.  INCLUDE_pcTaskGetTaskName must be\r
- * set to 1 in FreeRTOSConfig.h for pcTaskGetTaskName() to be available.\r
+ * handle, or by setting xTaskToQuery to NULL.\r
  *\r
- * \defgroup pcTaskGetTaskName pcTaskGetTaskName\r
+ * \defgroup pcTaskGetName pcTaskGetName\r
  * \ingroup TaskUtils\r
  */\r
-char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+char *pcTaskGetName( 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>TaskHandle_t xTaskGetTaskHandle( const char *pcNameToQuery );</PRE>\r
+ * <PRE>TaskHandle_t xTaskGetHandle( const char *pcNameToQuery );</PRE>\r
  *\r
  * NOTE:  This function takes a relatively long time to complete and should be\r
  * used sparingly.\r
  *\r
  * @return The handle of the task that has the human readable name pcNameToQuery.\r
- * NULL is returned if no matching name is found.  INCLUDE_xTaskGetTaskHandle\r
- * must be set to 1 in FreeRTOSConfig.h for pcTaskGetTaskHandle() to be available.\r
+ * NULL is returned if no matching name is found.  INCLUDE_xTaskGetHandle\r
+ * must be set to 1 in FreeRTOSConfig.h for pcTaskGetHandle() to be available.\r
  *\r
- * \defgroup pcTaskGetTaskHandle pcTaskGetTaskHandle\r
+ * \defgroup pcTaskGetHandle pcTaskGetHandle\r
  * \ingroup TaskUtils\r
  */\r
-TaskHandle_t xTaskGetTaskHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 \r
 /**\r
  * task.h\r
@@ -2125,14 +2196,14 @@ void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTi
  * Removes a task from both the specified event list and the list of blocked\r
  * tasks, and places it on a ready queue.\r
  *\r
- * xTaskRemoveFromEventList()/xTaskRemoveFromUnorderedEventList() will be called\r
+ * xTaskRemoveFromEventList()/vTaskRemoveFromUnorderedEventList() will be called\r
  * if either an event occurs to unblock a task, or the block timeout period\r
  * expires.\r
  *\r
  * xTaskRemoveFromEventList() is used when the event list is in task priority\r
  * order.  It removes the list item from the head of the event list as that will\r
  * have the highest priority owning task of all the tasks on the event list.\r
- * xTaskRemoveFromUnorderedEventList() is used when the event list is not\r
+ * vTaskRemoveFromUnorderedEventList() is used when the event list is not\r
  * ordered and the event list items hold something other than the owning tasks\r
  * priority.  In this case the event list item value is updated to the value\r
  * passed in the xItemValue parameter.\r
@@ -2141,7 +2212,7 @@ void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTi
  * making the call, otherwise pdFALSE.\r
  */\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
+void vTaskRemoveFromUnorderedEventList( 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
@@ -2191,7 +2262,7 @@ BaseType_t xTaskGetSchedulerState( void ) PRIVILEGED_FUNCTION;
  * 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( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
+BaseType_t xTaskPriorityInherit( 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
@@ -2199,6 +2270,16 @@ void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTIO
  */\r
 BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;\r
 \r
+/*\r
+ * If a higher priority task attempting to obtain a mutex caused a lower\r
+ * priority task to inherit the higher priority task's priority - but the higher\r
+ * priority task then timed out without obtaining the mutex, then the lower\r
+ * priority task will disinherit the priority again - but only down as far as\r
+ * the highest priority task that is still waiting for the mutex (if there were\r
+ * more than one task waiting for the mutex).\r
+ */\r
+void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask ) PRIVILEGED_FUNCTION;\r
+\r
 /*\r
  * Get the uxTCBNumber assigned to the task referenced by the xTask parameter.\r
  */\r
@@ -2242,6 +2323,13 @@ eSleepModeStatus eTaskConfirmSleepModeStatus( void ) PRIVILEGED_FUNCTION;
  */\r
 void *pvTaskIncrementMutexHeldCount( void ) PRIVILEGED_FUNCTION;\r
 \r
+/*\r
+ * For internal use only.  Same as vTaskSetTimeOutState(), but without a critial\r
+ * section.\r
+ */\r
+void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) PRIVILEGED_FUNCTION;\r
+\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r