From e92bf55eda3213ae34c22a78164d7dace5b82ab7 Mon Sep 17 00:00:00 2001 From: "Ching-Hsin,Lee" Date: Tue, 6 Aug 2024 18:01:17 +0800 Subject: [PATCH] Added v2 test --- .../Test/Target/tests/smp/crit_speed/crit_speed.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Test/Target/tests/smp/crit_speed/crit_speed.c b/FreeRTOS/Test/Target/tests/smp/crit_speed/crit_speed.c index 793cce30438..ac08ba359be 100644 --- a/FreeRTOS/Test/Target/tests/smp/crit_speed/crit_speed.c +++ b/FreeRTOS/Test/Target/tests/smp/crit_speed/crit_speed.c @@ -84,13 +84,21 @@ static void Test_CriticalSectionSpeed( void ) /* Test taskENTER_CRITICAL() elapsed time */ uxTemp = portTEST_GET_TIME(); - vTaskEnterCritical(); + #if ( portGRANULAR_LOCKING == 1 ) + taskENTER_CRITICAL(); + #else + vTaskEnterCritical(); + #endif uxEntryElapsedCumulative += ( portTEST_GET_TIME() - uxTemp ); /* Test taskEXIT_CRITICAL elapsed time */ uxTemp = portTEST_GET_TIME(); - vTaskExitCritical(); + #if ( portGRANULAR_LOCKING == 1 ) + taskEXIT_CRITICAL(); + #else + vTaskExitCritical(); + #endif uxExitElapsedCumulative += ( portTEST_GET_TIME() - uxTemp ); }