]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/GenQTest.c
Added an additional configASSERT() to test the new eTaskGetState() behaviour (see...
[freertos] / FreeRTOS / Demo / Common / Minimal / GenQTest.c
index 74a15f3321842cdc2606224349e80e6e8f307044..c74188334f0276ff73cef9c2cc0722e5294162c9 100644 (file)
@@ -446,6 +446,14 @@ xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;
                mutex, and block when it finds it cannot obtain it. */\r
                vTaskResume( xHighPriorityMutexTask );\r
 \r
+               /* Ensure the task is reporting it priority as blocked and not\r
+               suspended (as it would have done in versions up to V7.5.3). */\r
+               #if( INCLUDE_eTaskGetState == 1 )\r
+               {\r
+                       configASSERT( eTaskGetState( xHighPriorityMutexTask ) == eBlocked );\r
+               }\r
+               #endif /* INCLUDE_eTaskGetState */\r
+\r
                /* We should now have inherited the prioritoy of the high priority task,\r
                as by now it will have attempted to get the mutex. */\r
                if( uxTaskPriorityGet( NULL ) != genqMUTEX_HIGH_PRIORITY )\r