Remove temp variable for uxCurrentNumberOfTasks

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
This commit is contained in:
bradleysmith23 2024-02-02 15:00:46 -08:00 committed by GitHub
parent 69b6e18d5b
commit 53b05de491
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3192,9 +3192,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
/* Use temp variable as distinct sequence points for reading
* volatile variables prior to a comparison, per the coding guidelines */
UBaseType_t uxCurrentListLength = listCURRENT_LIST_LENGTH( &xSuspendedTaskList );
UBaseType_t uxCurrentNumOfTasks = uxCurrentNumberOfTasks;
if( uxCurrentListLength == uxCurrentNumOfTasks )
if( uxCurrentListLength == uxCurrentNumberOfTasks )
{
/* No other tasks are ready, so set pxCurrentTCB back to
* NULL so when the next task is created pxCurrentTCB will