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
\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
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
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
\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