]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Full/death.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / Common / Full / death.c
index e593eff9f58f01ed30d45aa53537a815722636f3..399da71d625bb69f8c0a6c1da5eec65bccfd8cd5 100644 (file)
@@ -86,7 +86,7 @@
 Changes from V2.0.0\r
 \r
        + Delay periods are now specified using variables and constants of\r
-         portTickType rather than unsigned long.\r
+         TickType_t rather than unsigned long.\r
 */\r
 \r
 #include <stdlib.h>\r
@@ -119,7 +119,7 @@ static const unsigned portBASE_TYPE uxMaxNumberOfExtraTasksRunning = 5;
 \r
 /* Used to store a handle to the tasks that should be killed by a suicidal task, \r
 before it kills itself. */\r
-xTaskHandle xCreatedTask1, xCreatedTask2;\r
+TaskHandle_t xCreatedTask1, xCreatedTask2;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -143,15 +143,15 @@ unsigned portBASE_TYPE *puxPriority;
 static void vSuicidalTask( void *pvParameters )\r
 {\r
 portDOUBLE d1, d2;\r
-xTaskHandle xTaskToKill;\r
-const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS;\r
+TaskHandle_t xTaskToKill;\r
+const TickType_t xDelay = ( TickType_t ) 500 / portTICK_PERIOD_MS;\r
 \r
        if( pvParameters != NULL )\r
        {\r
                /* This task is periodically created four times.  Tow created tasks are \r
                passed a handle to the other task so it can kill it before killing itself.  \r
                The other task is passed in null. */\r
-               xTaskToKill = *( xTaskHandle* )pvParameters;\r
+               xTaskToKill = *( TaskHandle_t* )pvParameters;\r
        }\r
        else\r
        {\r
@@ -169,7 +169,7 @@ const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS;
                if( xTaskToKill != NULL )\r
                {\r
                        /* Make sure the other task has a go before we delete it. */\r
-                       vTaskDelay( ( portTickType ) 0 );\r
+                       vTaskDelay( ( TickType_t ) 0 );\r
                        /* Kill the other task that was created by vCreateTasks(). */\r
                        vTaskDelete( xTaskToKill );\r
                        /* Kill ourselves. */\r
@@ -181,7 +181,7 @@ const portTickType xDelay = ( portTickType ) 500 / portTICK_RATE_MS;
 \r
 static void vCreateTasks( void *pvParameters )\r
 {\r
-const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS;\r
+const TickType_t xDelay = ( TickType_t ) 1000 / portTICK_PERIOD_MS;\r
 unsigned portBASE_TYPE uxPriority;\r
 const char * const pcTaskStartMsg = "Create task started.\r\n";\r
 \r