Empty while loop does not reload contition to check in each iteration. Add some statement to force reloading.
Before this change, this while loop compiles into below on Marvell port.
100b86:	e7fe      	b.n	100b86 <TEST_UTIL_Platform_Threads_IotThreads_MutexTest_+0x52>
@@ -238,6 +238,8 @@ TEST( UTIL_Platform_Threads, IotThreads_MutexTest )
/* Wait for signal to continue */
while( ti.testValue == 0 )
{
+ /* Force while loop reload condition every iteration. */
+ vTaskDelay( configTICK_RATE_HZ / 10 );
}
if( ti.testValue != 1 )
@@ -252,6 +254,8 @@ TEST( UTIL_Platform_Threads, IotThreads_MutexTest )
while( ti.testValue == 0 )
{
+ /* Force while loop reload condition every iteration. */
+ vTaskDelay( configTICK_RATE_HZ / 10 );
}
if( ti.testValue != 2 )
