]> git.sur5r.net Git - freertos/blobdiff - Source/croutine.c
Ensure that the configMAX_SYSCALL_INTERRUPT_PRIORITY setting works with all possible...
[freertos] / Source / croutine.c
index d6f1162625026c04f804dea1f8e5d5a21bfe53d9..61ada1c2918030a95655f7a42beb27ae6840c293 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V6.0.4 - 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
@@ -222,7 +222,7 @@ static void prvCheckPendingReadyList( void )
        /* Are there any co-routines waiting to get moved to the ready list?  These\r
        are co-routines that have been readied by an ISR.  The ISR cannot access\r
        the     ready lists itself. */\r
-       while( !listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) )\r
+       while( listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) == pdFALSE )\r
        {\r
                corCRCB *pxUnblockedCRCB;\r
 \r
@@ -263,8 +263,10 @@ corCRCB *pxCRCB;
                }\r
 \r
                /* See if this tick has made a timeout expire. */\r
-               while( ( pxCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList ) ) != NULL )\r
-               {       \r
+               while( listLIST_IS_EMPTY( pxDelayedCoRoutineList ) == pdFALSE )\r
+               {\r
+                       pxCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList );\r
+\r
                        if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) )                            \r
                        {                       \r
                                /* Timeout not yet expired. */                                                                                                                                                  \r
@@ -352,7 +354,8 @@ corCRCB *pxUnblockedCRCB;
 signed portBASE_TYPE xReturn;\r
 \r
        /* This function is called from within an interrupt.  It can only access\r
-       event lists and the pending ready list. */\r
+       event lists and the pending ready list.  This function assumes that a\r
+       check has already been made to ensure pxEventList is not empty. */\r
        pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList );\r
        vListRemove( &( pxUnblockedCRCB->xEventListItem ) );\r
        vListInsertEnd( ( xList * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) );\r