mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 05:34:59 -05:00
Declare uxCurrentListLength at top of function, update comment.
This commit is contained in:
parent
47469bf359
commit
52559f478b
1 changed files with 4 additions and 2 deletions
6
tasks.c
6
tasks.c
|
|
@ -3106,6 +3106,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
void vTaskSuspend( TaskHandle_t xTaskToSuspend )
|
||||
{
|
||||
TCB_t * pxTCB;
|
||||
UBaseType_t uxCurrentListLength;
|
||||
|
||||
traceENTER_vTaskSuspend( xTaskToSuspend );
|
||||
|
||||
|
|
@ -3190,8 +3191,9 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
* must be adjusted to point to a different task. */
|
||||
|
||||
/* 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 );
|
||||
* volatile variables prior to a comparison to ensure compliance
|
||||
* with MISRA C 2012 Rule 13.2. */
|
||||
uxCurrentListLength = listCURRENT_LIST_LENGTH( &xSuspendedTaskList );
|
||||
|
||||
if( uxCurrentListLength == uxCurrentNumberOfTasks )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue