]> git.sur5r.net Git - freertos/commitdiff
Fix in tasks.c related to https://sourceforge.net/tracker/?func=detail&aid=3295065...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 29 Apr 2011 19:33:07 +0000 (19:33 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 29 Apr 2011 19:33:07 +0000 (19:33 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1406 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/tasks.c

index 3f702605a492dec075dc5684da7ca276b8dfbd6c..194bf9b2fef41e04352663cc86f724f0a020567d 100644 (file)
@@ -944,9 +944,9 @@ tskTCB * pxNewTCB;
                                /* The scheduler is not running, but the task that was pointed\r
                                to by pxCurrentTCB has just been suspended and pxCurrentTCB\r
                                must be adjusted to point to a different task. */\r
-                               if( uxCurrentNumberOfTasks == ( unsigned portBASE_TYPE ) 1U )\r
+                               if( listCURRENT_LIST_LENGTH( &xSuspendedTaskList ) == uxCurrentNumberOfTasks ) \r
                                {\r
-                                       /* No other tasks are defined, so set pxCurrentTCB back to\r
+                                       /* No other tasks are ready, so set pxCurrentTCB back to\r
                                        NULL so when the next task is created pxCurrentTCB will\r
                                        be set to point to it no matter what its relative priority\r
                                        is. */\r