Go to the source code of this file.
Functions | |
void | vStartDynamicPriorityTasks (void) |
portBASE_TYPE | xAreDynamicPriorityTasksStillRunning (void) |
void vStartDynamicPriorityTasks | ( | void | ) |
Definition at line 167 of file dynamic.c.
References priSTACK_SIZE, priSUSPENDED_QUEUE_LENGTH, tskIDLE_PRIORITY, ulCounter, vQueueAddToRegistry, xContinousIncrementHandle, xLimitedIncrementHandle, xQueueCreate(), xSuspendedTestQueue, and xTaskCreate.
Referenced by main().
00168 { 00169 xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned long ) ); 00170 00171 /* vQueueAddToRegistry() adds the queue to the queue registry, if one is 00172 in use. The queue registry is provided as a means for kernel aware 00173 debuggers to locate queues and has no purpose if a kernel aware debugger 00174 is not being used. The call to vQueueAddToRegistry() will be removed 00175 by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 00176 defined to be less than 1. */ 00177 vQueueAddToRegistry( xSuspendedTestQueue, ( signed char * ) "Suspended_Test_Queue" ); 00178 00179 xTaskCreate( vContinuousIncrementTask, ( signed char * ) "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinousIncrementHandle ); 00180 xTaskCreate( vLimitedIncrementTask, ( signed char * ) "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle ); 00181 xTaskCreate( vCounterControlTask, ( signed char * ) "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); 00182 xTaskCreate( vQueueSendWhenSuspendedTask, ( signed char * ) "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); 00183 xTaskCreate( vQueueReceiveWhenSuspendedTask, ( signed char * ) "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); 00184 }
portBASE_TYPE xAreDynamicPriorityTasksStillRunning | ( | void | ) |
Definition at line 399 of file dynamic.c.
References pdFALSE, pdTRUE, portBASE_TYPE, usCheckVariable, xSuspendedQueueReceiveError, and xSuspendedQueueSendError.
Referenced by prvCheckOtherTasksAreStillRunning().
00400 { 00401 /* Keep a history of the check variables so we know if it has been incremented 00402 since the last call. */ 00403 static unsigned short usLastTaskCheck = ( unsigned short ) 0; 00404 portBASE_TYPE xReturn = pdTRUE; 00405 00406 /* Check the tasks are still running by ensuring the check variable 00407 is still incrementing. */ 00408 00409 if( usCheckVariable == usLastTaskCheck ) 00410 { 00411 /* The check has not incremented so an error exists. */ 00412 xReturn = pdFALSE; 00413 } 00414 00415 if( xSuspendedQueueSendError == pdTRUE ) 00416 { 00417 xReturn = pdFALSE; 00418 } 00419 00420 if( xSuspendedQueueReceiveError == pdTRUE ) 00421 { 00422 xReturn = pdFALSE; 00423 } 00424 00425 usLastTaskCheck = usCheckVariable; 00426 return xReturn; 00427 }