]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/list.c
+ New feature added: Task notifications.
[freertos] / FreeRTOS / Source / list.c
index 1459dbe1737ce5aba15001cd44bff1b96aaba440..a8d9d5b90670d5fedb59702b077960ce6e4bc566 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
-    >>! 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
+    >>!   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
     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
@@ -125,13 +125,12 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
 \r
        /* Insert the new list item into the list, sorted in xItemValue order.\r
 \r
-       If the list already contains a list item with the same item value then\r
-       the new list item should be placed after it.  This ensures that TCB's which\r
-       are stored in ready lists (all of which have the same xItemValue value)\r
-       get an equal share of the CPU.  However, if the xItemValue is the same as\r
-       the back marker the iteration loop below will not end.  This means we need\r
-       to guard against this by checking the value first and modifying the\r
-       algorithm slightly if necessary. */\r
+       If the list already contains a list item with the same item value then the\r
+       new list item should be placed after it.  This ensures that TCB's which are\r
+       stored in ready lists (all of which have the same xItemValue value) get a\r
+       share of the CPU.  However, if the xItemValue is the same as the back marker\r
+       the iteration loop below will not end.  Therefore the value is checked\r
+       first, and the algorithm slightly modified if necessary. */\r
        if( xValueOfInsertion == portMAX_DELAY )\r
        {\r
                pxIterator = pxList->xListEnd.pxPrevious;\r
@@ -139,27 +138,31 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
        else\r
        {\r
                /* *** NOTE ***********************************************************\r
-               If you find your application is crashing here then likely causes are:\r
+               If you find your application is crashing here then likely causes are\r
+               listed below.  In addition see http://www.freertos.org/FAQHelp.html for\r
+               more tips, and ensure configASSERT() is defined!\r
+               http://www.freertos.org/a00110.html#configASSERT\r
+\r
                        1) Stack overflow -\r
                           see http://www.freertos.org/Stacks-and-stack-overflow-checking.html\r
-                       2) Incorrect interrupt priority assignment, especially on Cortex-M3\r
+                       2) Incorrect interrupt priority assignment, especially on Cortex-M\r
                           parts where numerically high priority values denote low actual\r
-                          interrupt priories, which can seem counter intuitive.  See\r
-                          configMAX_SYSCALL_INTERRUPT_PRIORITY on http://www.freertos.org/a00110.html\r
+                          interrupt priorities, which can seem counter intuitive.  See\r
+                          http://www.freertos.org/RTOS-Cortex-M3-M4.html and the definition\r
+                          of configMAX_SYSCALL_INTERRUPT_PRIORITY on\r
+                          http://www.freertos.org/a00110.html\r
                        3) Calling an API function from within a critical section or when\r
                           the scheduler is suspended, or calling an API function that does\r
                           not end in "FromISR" from an interrupt.\r
                        4) Using a queue or semaphore before it has been initialised or\r
                           before the scheduler has been started (are interrupts firing\r
                           before vTaskStartScheduler() has been called?).\r
-               See http://www.freertos.org/FAQHelp.html for more tips, and ensure\r
-               configASSERT() is defined!  http://www.freertos.org/a00110.html#configASSERT\r
                **********************************************************************/\r
 \r
                for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM.  This is checked and valid. */\r
                {\r
-                       /* There is nothing to do here, we are just iterating to the\r
-                       wanted insertion position. */\r
+                       /* There is nothing to do here, just iterating to the wanted\r
+                       insertion position. */\r
                }\r
        }\r
 \r