]> git.sur5r.net Git - freertos/blobdiff - Source/list.c
Continue work on the timers module.
[freertos] / Source / list.c
index dcf82639f0eb9432a33e59d7303d481607839d3b..4b0a3cdc11783102ea62b8e4dcdc0ff83b7a744e 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V6.0.5 - Copyright (C) 2010 Real Time Engineers Ltd.\r
+    FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.\r
 \r
     ***************************************************************************\r
     *                                                                         *\r
@@ -10,7 +10,7 @@
     *    + Looking for basic training,                                        *\r
     *    + Wanting to improve your FreeRTOS skills and productivity           *\r
     *                                                                         *\r
-    * then take a look at the FreeRTOS eBook                                  *\r
+    * then take a look at the FreeRTOS books - available as PDF or paperback  *\r
     *                                                                         *\r
     *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
     *                  http://www.FreeRTOS.org/Documentation                  *\r
@@ -33,9 +33,9 @@
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
-    more details. You should have received a copy of the GNU General Public \r
-    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
-    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    more details. You should have received a copy of the GNU General Public\r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it\r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
     by writing to Richard Barry, contact details for whom are available on the\r
     FreeRTOS WEB site.\r
 \r
@@ -76,7 +76,7 @@ void vListInitialise( xList *pxList )
        pxList->xListEnd.pxNext = ( xListItem * ) &( pxList->xListEnd );\r
        pxList->xListEnd.pxPrevious = ( xListItem * ) &( pxList->xListEnd );\r
 \r
-       pxList->uxNumberOfItems = 0;\r
+       pxList->uxNumberOfItems = ( unsigned portBASE_TYPE ) 0U;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -121,9 +121,9 @@ portTickType xValueOfInsertion;
        /* 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 ulListItem value)\r
-       get an equal share of the CPU.  However, if the xItemValue is the same as \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
+       to guard against this by checking the value first and modifying the\r
        algorithm slightly if necessary. */\r
        if( xValueOfInsertion == portMAX_DELAY )\r
        {\r
@@ -133,18 +133,18 @@ portTickType xValueOfInsertion;
        {\r
                /* *** NOTE ***********************************************************\r
                If you find your application is crashing here then likely causes are:\r
-                       1) Stack overflow - \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
-                          parts where numerically high priority values denote low actual \r
-                          interrupt priories, which can seem counter intuitive.  See \r
+                       2) Incorrect interrupt priority assignment, especially on Cortex-M3\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
                        3) Calling an API function from within a critical section or when\r
                           the scheduler is suspended.\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. \r
+               See http://www.freertos.org/FAQHelp.html for more tips.\r
                **********************************************************************/\r
                \r
                for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )\r