From ad0b60a1209d3ce6d514076a22ef6e69157de3df Mon Sep 17 00:00:00 2001 From: richardbarry Date: Fri, 29 Apr 2011 19:33:07 +0000 Subject: [PATCH] Fix in tasks.c related to https://sourceforge.net/tracker/?func=detail&aid=3295065&group_id=111543&atid=659633 git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1406 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/tasks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/tasks.c b/Source/tasks.c index 3f702605a..194bf9b2f 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -944,9 +944,9 @@ tskTCB * pxNewTCB; /* The scheduler is not running, but the task that was pointed to by pxCurrentTCB has just been suspended and pxCurrentTCB must be adjusted to point to a different task. */ - if( uxCurrentNumberOfTasks == ( unsigned portBASE_TYPE ) 1U ) + if( listCURRENT_LIST_LENGTH( &xSuspendedTaskList ) == uxCurrentNumberOfTasks ) { - /* No other tasks are defined, so set pxCurrentTCB back to + /* No other tasks are ready, so set pxCurrentTCB back to NULL so when the next task is created pxCurrentTCB will be set to point to it no matter what its relative priority is. */ -- 2.39.5