From f64acd6a48af1aaf3fc11c6c089397aaa3a8ba66 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Tue, 22 Oct 2013 09:33:49 +0000 Subject: [PATCH] Added an additional configASSERT() to test the new eTaskGetState() behaviour (see previous checking comment). --- FreeRTOS/Demo/Common/Minimal/GenQTest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FreeRTOS/Demo/Common/Minimal/GenQTest.c b/FreeRTOS/Demo/Common/Minimal/GenQTest.c index 74a15f332..c74188334 100644 --- a/FreeRTOS/Demo/Common/Minimal/GenQTest.c +++ b/FreeRTOS/Demo/Common/Minimal/GenQTest.c @@ -446,6 +446,14 @@ xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters; mutex, and block when it finds it cannot obtain it. */ vTaskResume( xHighPriorityMutexTask ); + /* Ensure the task is reporting it priority as blocked and not + suspended (as it would have done in versions up to V7.5.3). */ + #if( INCLUDE_eTaskGetState == 1 ) + { + configASSERT( eTaskGetState( xHighPriorityMutexTask ) == eBlocked ); + } + #endif /* INCLUDE_eTaskGetState */ + /* We should now have inherited the prioritoy of the high priority task, as by now it will have attempted to get the mutex. */ if( uxTaskPriorityGet( NULL ) != genqMUTEX_HIGH_PRIORITY )