From 1aaa318f1cdf2d35b47c7f64e7c453cacc184d2a Mon Sep 17 00:00:00 2001 From: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Date: Mon, 4 Sep 2023 18:10:36 +0800 Subject: [PATCH] Update INFINITE_LOOP control (#775) * Use for loop instead of while loop for INFINITE_LOOP control --- tasks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index 2786c5ab0..6cb233e7a 100644 --- a/tasks.c +++ b/tasks.c @@ -5118,7 +5118,7 @@ void vTaskMissedYield( void ) taskYIELD(); - while( INFINITE_LOOP() ) + for( ; INFINITE_LOOP(); ) { #if ( configUSE_PREEMPTION == 0 ) { @@ -5203,7 +5203,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters ) } #endif /* #if ( configNUMBER_OF_CORES > 1 ) */ - while( INFINITE_LOOP() ) + for( ; INFINITE_LOOP(); ) { /* See if any tasks have deleted themselves - if so then the idle task * is responsible for freeing the deleted task's TCB and stack. */