]> git.sur5r.net Git - freertos/commitdiff
Add some asserts into the common demo tasks to catch scenarios where the tasks are...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 21 Oct 2019 17:17:34 +0000 (17:17 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 21 Oct 2019 17:17:34 +0000 (17:17 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2746 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
FreeRTOS/Demo/Common/Minimal/TaskNotify.c
FreeRTOS/Demo/Common/Minimal/blocktim.c

index 8890f4deb1bb2ffb8e3a76d3124236a6421da837..21b2d7769da04b53297b599e5e105c6593da26ab 100644 (file)
@@ -976,6 +976,9 @@ BaseType_t xMessagePosted;
        /* Called periodically from the tick hook to exercise the "FromISR"\r
        functions. */\r
 \r
+       /* Check the even group tasks were actually created. */\r
+       configASSERT( xISREventGroup );\r
+\r
        xCallCount++;\r
 \r
        if( xCallCount == xSetBitCount )\r
index 8307323b7765e2327a2251cebe265df95db8e282..4adc06f56d6af4b7312c55b3d79cfeabc6c2b682 100644 (file)
@@ -609,6 +609,9 @@ const BaseType_t xCallInterval = pdMS_TO_TICKS( 50 );
 uint32_t ulPreviousValue;\r
 const uint32_t ulUnexpectedValue = 0xff;\r
 \r
+       /* Check the task notification demo tasks were actually created. */\r
+       configASSERT( xTaskToNotify );\r
+\r
        /* The task performs some tests before starting the timer that gives the\r
        notification from this interrupt.  If the timer has not been created yet\r
        then the initial tests have not yet completed and the notification should\r
index 22a3b8ce4e732c3f38c79ab06e9b97451f4318a5..9abf824fc8bf988f6caae6a54c26d25df2a1b67f 100644 (file)
@@ -478,7 +478,8 @@ const TickType_t xPeriod = 75, xCycles = 5, xAllowableMargin = ( bktALLOWABLE_MA
        high as to disrupt the timer tests. */\r
        vTaskPrioritySet( NULL, configTIMER_TASK_PRIORITY - 1 );\r
 \r
-       /* Crude check to too that vTaskDelay() blocks for the expected period. */\r
+       /* Crude check to too see that vTaskDelay() blocks for the expected\r
+       period. */\r
        xPreTime = xTaskGetTickCount();\r
        vTaskDelay( bktTIME_TO_BLOCK );\r
        xPostTime = xTaskGetTickCount();\r