这篇教程C++ xAreDynamicPriorityTasksStillRunning函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xAreDynamicPriorityTasksStillRunning函数的典型用法代码示例。如果您正苦于以下问题:C++ xAreDynamicPriorityTasksStillRunning函数的具体用法?C++ xAreDynamicPriorityTasksStillRunning怎么用?C++ xAreDynamicPriorityTasksStillRunning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xAreDynamicPriorityTasksStillRunning函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: prvMainCheckOtherTasksAreStillRunningstatic void prvMainCheckOtherTasksAreStillRunning( void ){ /* Check all the demo tasks (other than the flash tasks) to ensure that they are all still running, and that none of them have detected an error. */ /* This function is called from more than one task. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { lErrorInTask = pdTRUE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { lErrorInTask = pdTRUE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lErrorInTask = pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lErrorInTask = pdTRUE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lErrorInTask = pdTRUE; }}
开发者ID:Eclo,项目名称:FreeRTOS,代码行数:32,
示例2: vCheckTimerCallbackstatic void vCheckTimerCallback( xTimerHandle xTimer ){static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;/* Define the status message that is sent to the LCD task. By default thestatus is PASS. */static xQueueMessage xStatusMessage = { mainMESSAGE_STATUS, pdPASS }; /* This is the callback function used by the 'check' timer, as described at the top of this file. */ /* The parameter is not used. */ ( void ) xTimer; /* See if the standard demo tasks are executing as expected, changing the message that is sent to the LCD task from PASS to an error code if any tasks set reports an error. */ if( xAreComTestTasksStillRunning() != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_COM_TEST; } if( xAreDynamicPriorityTasksStillRunning() != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_DYNAMIC_TASKS; } if( xAreGenericQueueTasksStillRunning() != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_GEN_QUEUE_TEST; } if( xAreCountingSemaphoreTasksStillRunning() != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_COUNT_SEM_TEST; } if( xAreTimerDemoTasksStillRunning( ( portTickType ) mainCHECK_TIMER_PERIOD ) != pdPASS ) { xStatusMessage.ulMessageValue = mainERROR_TIMER_TEST; } /* Check the reg test tasks are still cycling. They will stop incrementing their loop counters if they encounter an error. */ if( usRegTest1Counter == usLastRegTest1Counter ) { xStatusMessage.ulMessageValue = mainERROR_REG_TEST; } if( usRegTest2Counter == usLastRegTest2Counter ) { xStatusMessage.ulMessageValue = mainERROR_REG_TEST; } usLastRegTest1Counter = usRegTest1Counter; usLastRegTest2Counter = usRegTest2Counter; /* This is called from a timer callback so must not block! */ xQueueSendToBack( xLCDQueue, &xStatusMessage, mainDONT_BLOCK );}
开发者ID:Bjoe,项目名称:msp340x-msp340-5438-stk-ccs,代码行数:60,
示例3: prvCheckTimerCallback/* See the description at the top of this file. */static void prvCheckTimerCallback( TimerHandle_t xTimer ){ static long lChangedTimerPeriodAlready = pdFALSE; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; unsigned long ulErrorFound = pdFALSE; /* Check all the demo and test tasks to ensure that they are all still running, and that none have detected an error. */ if( xAreDynamicPriorityTasksStillRunning() != pdPASS ) { ulErrorFound |= ( 0x01UL << 0UL ); } if( xAreBlockTimeTestTasksStillRunning() != pdPASS ) { ulErrorFound |= ( 0x01UL << 1UL ); } if( xAreCountingSemaphoreTasksStillRunning() != pdPASS ) { ulErrorFound |= ( 0x01UL << 2UL ); } if( xAreRecursiveMutexTasksStillRunning() != pdPASS ) { ulErrorFound |= ( 0x01UL << 3UL ); } /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { ulErrorFound |= ( 0x01UL << 4UL ); } ulLastRegTest1Value = ulRegTest1LoopCounter; /* Check that the register test 2 task is still running. */ if( ulLastRegTest2Value == ulRegTest2LoopCounter ) { ulErrorFound |= ( 0x01UL << 5UL ); } ulLastRegTest2Value = ulRegTest2LoopCounter; /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ vParTestToggleLED( mainCHECK_LED ); /* Have any errors been latched in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED toggles. */ if( ulErrorFound != pdFALSE ) { if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); } }}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:57,
示例4: prvCheckOtherTasksAreStillRunning/*! * /brief Checks that all the demo application tasks are still executing without error. */static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void ){static portBASE_TYPE xErrorHasOccurred = pdFALSE; if( xAreComTestTasksStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #if (BOARD != UC3L_EK) if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #endif #if (BOARD != UC3L_EK) if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #endif #if (BOARD != EVK1101) && (BOARD != UC3L_EK) if( xAreBlockingQueuesStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #endif #if (BOARD != UC3L_EK) if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #endif #if (BOARD != EVK1101) && (BOARD != UC3L_EK) if( xAreMathsTaskStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } #endif if( xIsCreateTaskStillRunning() != pdTRUE ) { xErrorHasOccurred = pdTRUE; } return ( xErrorHasOccurred );}
开发者ID:InSoonPark,项目名称:asf,代码行数:59,
示例5: prvCheckOtherTasksAreStillRunningstatic long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ){long lReturn = ( long ) pdPASS; /* Check all the demo tasks (other than the flash tasks) to ensure that they are all still running, and that none of them have detected an error. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xAreComTestTasksStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xArePollingQueuesStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xAreMathsTaskStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lReturn = ( long ) pdFAIL; } if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE ) { /* The vMemCheckTask did not increment the counter - it must have failed. */ lReturn = ( long ) pdFAIL; } return lReturn;}
开发者ID:HclX,项目名称:freertos,代码行数:52,
示例6: vApplicationTickHookvoid vApplicationTickHook( void ){ unsigned portBASE_TYPE uxColumn = 0; static xLCDMessage xMessage = { 0, "PASS" }; static unsigned long ulTicksSinceLastDisplay = 0; static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* Called from every tick interrupt. Have enough ticks passed to make it time to perform our health status check again? */ ulTicksSinceLastDisplay++; if( ulTicksSinceLastDisplay >= mainCHECK_DELAY ) { ulTicksSinceLastDisplay = 0; /* Has an error been found in any task? */ if( xAreBlockingQueuesStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - BLOCKQ"; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - BLOCKTIM"; } if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - GENQ"; } if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - PEEKQ"; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xMessage.pcMessage = "ERROR - DYNAMIC"; } xMessage.xColumn++; /* Send the message to the LCD gatekeeper for display. */ xHigherPriorityTaskWoken = pdFALSE; xQueueSendToBackFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken ); }}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:48,
示例7: prvCheckOtherTasksAreStillRunningstatic void prvCheckOtherTasksAreStillRunning( void ){ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorFlags |= 0x01; } if( xArePollingQueuesStillRunning() != pdTRUE ) { ulErrorFlags |= 0x02; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorFlags |= 0x04; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorFlags |= 0x08; } if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorFlags |= 0x10; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorFlags |= 0x20; } if( xAreMathsTaskStillRunning() != pdTRUE ) { ulErrorFlags |= 0x40; } if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorFlags |= 0x80; } if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { ulErrorFlags |= 0x100; } }
开发者ID:svn2github,项目名称:freertos,代码行数:48,
示例8: prvCheckOtherTasksAreStillRunning/* * Check each set of tasks in turn to see if they have experienced any * error conditions. */static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount ){long lNoErrorsDiscovered = ( long ) pdTRUE; if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xAreComTestTasksStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xAreMathsTaskStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lNoErrorsDiscovered = pdFALSE; } if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE ) { /* The vMemCheckTask task did not increment the counter - it must have failed. */ lNoErrorsDiscovered = pdFALSE; } return lNoErrorsDiscovered;}
开发者ID:LinuxJohannes,项目名称:FreeRTOS,代码行数:52,
示例9: prvCheckOtherTasksAreStillRunningstatic char prvCheckOtherTasksAreStillRunning( void ){ char cErrorHasOccurred = ( char ) pdFALSE; if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { cErrorHasOccurred = ( char ) pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { cErrorHasOccurred = ( char ) pdTRUE; } return cErrorHasOccurred;}
开发者ID:AskDrCatcher,项目名称:FreeRTOS,代码行数:16,
示例10: prvCheckOtherTasksAreStillRunningstatic portLONG prvCheckOtherTasksAreStillRunning( void ){portLONG lReturn = pdPASS; /* Check all the demo tasks (other than the flash tasks) to ensure that they are all still running, and that none of them have detected an error. */ if( xAreIntegerMathsTaskStillRunning() != pdPASS ) { lReturn = pdFAIL; } if( xAreComTestTasksStillRunning() != pdPASS ) { lReturn = pdFAIL; } #ifdef KEIL_THUMB_INTERWORK /* When using THUMB mode we can start more tasks without the executable exceeding the size limit imposed by the evaluation version of uVision3. */ if( xArePollingQueuesStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } #endif return lReturn;}
开发者ID:Paolo-Maffei,项目名称:nxstack,代码行数:46,
示例11: prvCheckOtherTasksAreStillRunningstatic long prvCheckOtherTasksAreStillRunning( void ){portBASE_TYPE xAllTasksPassed = pdPASS; if( xArePollingQueuesStillRunning() != pdTRUE ) { xAllTasksPassed = pdFAIL; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xAllTasksPassed = pdFAIL; } if( xAreComTestTasksStillRunning() != pdTRUE ) { xAllTasksPassed = pdFALSE; } if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { xAllTasksPassed = pdFALSE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { xAllTasksPassed = pdFALSE; } if( xIsCreateTaskStillRunning() != pdTRUE ) { xAllTasksPassed = pdFALSE; } /* Also check the status flag for the tasks defined within this function. */ if( xLocalError != pdFALSE ) { xAllTasksPassed = pdFAIL; } return xAllTasksPassed;}
开发者ID:ptracton,项目名称:experimental,代码行数:42,
示例12: prvCheckTimerCallbackstatic void prvCheckTimerCallback( TimerHandle_t xTimer ){static long lChangedTimerPeriodAlready = pdFALSE;unsigned long ulErrorFound = pdFALSE; /* Check all the demo tasks (other than the flash tasks) to ensure they are all still running, and that none have detected an error. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xIsCreateTaskStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ vParTestToggleLED( mainCHECK_LED ); /* Have any errors been latch in ulErrorFound? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED toggles. */ if( ulErrorFound != pdFALSE ) { if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); } }}
开发者ID:bleuelotus,项目名称:SweepRobot_Testing_Host,代码行数:74,
示例13: prvCheckTaskstatic void prvCheckTask( void *pvParameters ){TickType_t xNextWakeTime;const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS; /* Just to remove compiler warning. */ ( void ) pvParameters; /* Initialise xNextWakeTime - this only needs to be done once. */ xNextWakeTime = xTaskGetTickCount(); for( ;; ) { /* Place this task in the blocked state until it is time to run again. */ vTaskDelayUntil( &xNextWakeTime, xCycleFrequency ); /* Check the standard demo tasks are running without error. */ #if( configUSE_PREEMPTION != 0 ) { /* These tasks are only created when preemption is used. */ if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE ) { pcStatusMessage = "Error: TimerDemo"; } } #endif if( xAreEventGroupTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: EventGroup"; } else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { pcStatusMessage = "Error: IntMath"; } else if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: GenQueue"; } else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: QueuePeek"; } else if( xAreBlockingQueuesStillRunning() != pdTRUE ) { pcStatusMessage = "Error: BlockQueue"; } else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: SemTest"; } else if( xArePollingQueuesStillRunning() != pdTRUE ) { pcStatusMessage = "Error: PollQueue"; } else if( xAreMathsTaskStillRunning() != pdPASS ) { pcStatusMessage = "Error: Flop"; } else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: RecMutex"; } else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: CountSem"; } else if( xIsCreateTaskStillRunning() != pdTRUE ) { pcStatusMessage = "Error: Death"; } else if( xAreDynamicPriorityTasksStillRunning() != pdPASS ) { pcStatusMessage = "Error: Dynamic"; } else if( xAreQueueSetTasksStillRunning() != pdPASS ) { pcStatusMessage = "Error: Queue set"; } else if( xIsQueueOverwriteTaskStillRunning() != pdPASS ) { pcStatusMessage = "Error: Queue overwrite"; } /* This is the only task that uses stdout so its ok to call printf() directly. */ printf( "%s - %d/r/n", pcStatusMessage, xTaskGetTickCount() ); }}
开发者ID:vmandrews,项目名称:CSDC-OBC-Software,代码行数:89,
示例14: vCheckTaskstatic void vCheckTask( void *pvParameters ){static unsigned long ulErrorDetected = pdFALSE; portTickType xLastExecutionTime;unsigned char *ucErrorMessage = ( unsigned char * )" FAIL";unsigned char *ucSuccessMessage = ( unsigned char * )" PASS";unsigned portBASE_TYPE uxColumn = mainMAX_WRITE_COLUMN;LCDMessage xMessage; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() works correctly. */ xLastExecutionTime = xTaskGetTickCount(); for( ;; ) { /* Wait until it is time for the next cycle. */ vTaskDelayUntil( &xLastExecutionTime, mainCHECK_TASK_CYCLE_TIME ); /* Has an error been found in any of the standard demo tasks? */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; } if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorDetected = pdTRUE; } /* Calculate the LCD line on which we would like the message to be displayed. The column variable is used for convenience as it is incremented each cycle anyway. */ xMessage.ucLine = ( unsigned char ) ( uxColumn & 0x01 ); /* The message displayed depends on whether an error was found or not. Any discovered error is latched. Here the column variable is used as an index into the text string as a simple way of moving the text from column to column. */ if( ulErrorDetected == pdFALSE ) { xMessage.pucString = ucSuccessMessage + uxColumn; } else { xMessage.pucString = ucErrorMessage + uxColumn; } /* Send the message to the print task for display. */ xQueueSend( xLCDQueue, ( void * ) &xMessage, mainNO_DELAY ); /* Make sure the message is printed in a different column the next time around. */ uxColumn--; if( uxColumn == 0 ) { uxColumn = mainMAX_WRITE_COLUMN; } }}
开发者ID:denal05,项目名称:STM32L152-EVAL,代码行数:75,
示例15: prvCheckOtherTasksAreStillRunningstatic short prvCheckOtherTasksAreStillRunning( void ){portBASE_TYPE lReturn = pdPASS; /* The demo tasks maintain a count that increments every cycle of the task provided that the task has never encountered an error. This function checks the counts maintained by the tasks to ensure they are still being incremented. A count remaining at the same value between calls therefore indicates that an error has been detected. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreComTestTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreMathsTaskStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xIsCreateTaskStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if ( xAreGenericQueueTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } if ( xAreQueuePeekTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; } /* Have the register test tasks found any errors? */ if( ulRegTestError != pdFALSE ) { lReturn = pdFAIL; } return lReturn;}
开发者ID:vstehle,项目名称:FreeRTOS,代码行数:68,
示例16: vCheckTaskstatic void vCheckTask( void *pvParameters ){portBASE_TYPE xErrorOccurred = pdFALSE;TickType_t xLastExecutionTime;const char * const pcPassMessage = "PASS/n";const char * const pcFailMessage = "FAIL/n"; /* Just to remove compiler warnings. */ ( void ) pvParameters; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() works correctly. */ xLastExecutionTime = xTaskGetTickCount(); for( ;; ) { /* Perform this check every mainCHECK_DELAY milliseconds. */ vTaskDelayUntil( &xLastExecutionTime, mainCHECK_DELAY ); /* Has an error been found in any task? */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } #if configUSE_PREEMPTION == 1 { /* The timing of console output when not using the preemptive scheduler causes the block time tests to detect a timing problem. */ if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } } #endif if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { xErrorOccurred = pdTRUE; } /* Send either a pass or fail message. If an error is found it is never cleared again. */ if( xErrorOccurred == pdTRUE ) { xLED_Delay = mainERROR_LED_DELAY; xQueueSend( xPrintQueue, &pcFailMessage, portMAX_DELAY ); } else { xQueueSend( xPrintQueue, &pcPassMessage, portMAX_DELAY ); } }}
开发者ID:AskDrCatcher,项目名称:FreeRTOS,代码行数:75,
示例17: prvCheckTimerCallbackstatic void prvCheckTimerCallback( xTimerHandle xTimer ){static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS; /* Inspect the status of the standard demo tasks. */ if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xErrorStatus = pdFAIL; } if( xArePollingQueuesStillRunning() != pdTRUE ) { xErrorStatus = pdFAIL; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { xErrorStatus = pdFAIL; } /* Inspect the status of the reg test tasks. */ if( sRegTestStatus != pdPASS ) { xErrorStatus = pdFAIL; } /* Ensure that the demo software timer has expired mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT times in between each call of this function. A critical section is not required to access ulDemoSoftwareTimerCounter as the variable is only accessed from another software timer callback, and only one software timer callback can be executing at any time. */ if( ( ulDemoSoftwareTimerCounter < ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT - 1 ) ) || ( ulDemoSoftwareTimerCounter > ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT + 1 ) ) ) { xErrorStatus = pdFAIL; } else { ulDemoSoftwareTimerCounter = 0UL; } if( ( xErrorStatus == pdFAIL ) && ( xChangedTimerPeriodAlready == pdFALSE ) ) { /* An error has occurred, but the timer's period has not yet been changed, change it now, and remember that it has been changed. Shortening the timer's period means the LED will toggle at a faster rate, giving a visible indication that something has gone wrong. */ xChangedTimerPeriodAlready = pdTRUE; /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); } /* Toggle the LED. The toggle rate will depend on whether or not an error has been found in any tasks. */ mainLED_0 = !mainLED_0;}
开发者ID:BirdBare,项目名称:STM32F4-Discovery_FW_V1.1.0_Makefiles,代码行数:61,
示例18: prvCheckTimerCallbackstatic void prvCheckTimerCallback( xTimerHandle xTimer ){static long lChangeToRedLEDsAlready = pdFALSE;static unsigned long ulLastRegTest1Counter = 0, ulLastRegTest2Counter = 0;unsigned long ulErrorFound = pdFALSE;/* LEDs are defaulted to use the Green LEDs. The Red LEDs are used if an erroris found. */static unsigned long ulLED1 = 8, ulLED2 = 11;const unsigned long ulRedLED1 = 6, ulRedLED2 = 9; /* Check all the demo tasks (other than the flash tasks) to ensure they are all still running, and that none have detected an error. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xIsCreateTaskStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreMathsTaskStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } if( xAreComTestTasksStillRunning() != pdTRUE ) { ulErrorFound = pdTRUE; } /* Check the reg test tasks are still cycling. They will stop incrementing their loop counters if they encounter an error. */ if( ulRegTest1Counter == ulLastRegTest1Counter ) { ulErrorFound = pdTRUE; } if( ulRegTest2Counter == ulLastRegTest2Counter ) { ulErrorFound = pdTRUE; } ulLastRegTest1Counter = ulRegTest1Counter; ulLastRegTest2Counter = ulRegTest2Counter; /* Toggle the check LEDs to give an indication of the system status. If the green LEDs are toggling, then no errors have been detected. If the red LEDs are toggling, then an error has been reported in at least one task. */ vParTestToggleLED( ulLED1 ); vParTestToggleLED( ulLED2 ); /* Have any errors been latch in ulErrorFound? If so, ensure the gree LEDs are off, then switch to using the red LEDs. */ if( ulErrorFound != pdFALSE ) { if( lChangeToRedLEDsAlready == pdFALSE ) { lChangeToRedLEDsAlready = pdTRUE; /* An error has been found. Switch to use the red LEDs. */ vParTestSetLED( ulLED1, pdFALSE ); vParTestSetLED( ulLED2, pdFALSE );//.........这里部分代码省略.........
开发者ID:InSoonPark,项目名称:FreeRTOS,代码行数:101,
示例19: vApplicationTickHookvoid vApplicationTickHook( void ){static unsigned long ulCallCount = 0, ulErrorFound = pdFALSE;/* The rate at which LED D4 will toggle if an error has been found in one or more of the standard demo tasks. */const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS;/* The rate at which LED D4 will toggle if no errors have been found in anyof the standard demo tasks. */const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS; ulCallCount++; if( ulErrorFound != pdFALSE ) { /* We have already found an error, so flash the LED with the appropriate frequency. */ if( ulCallCount > ulErrorFlashRate ) { ulCallCount = 0; vParTestToggleLED( mainERROR_LED ); } } else { if( ulCallCount > ulNoErrorCheckRate ) { ulCallCount = 0; /* We have not yet found an error. Check all the demo tasks to ensure this is still the case. */ if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorFound |= 0x01; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorFound |= 0x02; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorFound |= 0x04; } if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorFound |= 0x08; } if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { ulErrorFound |= 0x10; } vParTestToggleLED( mainERROR_LED ); } }}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:62,
示例20: prvCheckTimerCallbackstatic void prvCheckTimerCallback( TimerHandle_t xTimer ){ /* Check the standard demo tasks are running without error. Latch the latest reported error in the pcStatusMessage character pointer. */ if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: GenQueue"; } if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: QueuePeek/r/n"; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { pcStatusMessage = "Error: BlockQueue/r/n"; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: BlockTime/r/n"; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: SemTest/r/n"; } if( xIsCreateTaskStillRunning() != pdTRUE ) { pcStatusMessage = "Error: Death/r/n"; } if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: RecMutex/r/n"; } if( xAreComTestTasksStillRunning() != pdPASS ) { pcStatusMessage = "Error: ComTest/r/n"; } if( xAreTimerDemoTasksStillRunning( ( mainCHECK_TIMER_PERIOD_MS ) ) != pdTRUE ) { pcStatusMessage = "Error: TimerDemo"; } if( xArePollingQueuesStillRunning() != pdTRUE ) { pcStatusMessage = "Error: PollQueue"; } if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: CountSem"; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { pcStatusMessage = "Error: DynamicPriority"; } /* Toggle the check LED to give an indication of the system status. If the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then everything is ok. A faster toggle indicates an error. */ vParTestToggleLED( mainCHECK_LED ); /* Have any errors been latch in pcStatusMessage? If so, shorten the period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds. This will result in an increase in the rate at which mainCHECK_LED toggles. */ if( pcStatusMessage != NULL ) { /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block. */ xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); }}
开发者ID:AldenHiggins,项目名称:ELEC424-Lab06-Scheduling-with-FreeRTOS,代码行数:81,
示例21: prvCheckTimerCallbackstatic void prvCheckTimerCallback( TimerHandle_t xTimer ){static long lChangedTimerPeriodAlready = pdFALSE;static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;unsigned long ulErrorOccurred = pdFALSE; /* Avoid compiler warnings. */ ( void ) xTimer; /* Have any of the standard demo tasks detected an error in their operation? */ if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 3UL ); } else if( xAreQueuePeekTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 4UL ); } else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 5UL ); } else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 6UL ); } else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 8UL ); } else if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 9UL ); } else if( xIsQueueOverwriteTaskStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 10UL ); } else if( xAreQueueSetTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 11UL ); } else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 12UL ); } else if( xAreEventGroupTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 13UL ); } else if( xAreTaskNotificationTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 14UL ); } else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= ( 0x01UL << 15UL ); } else if( xAreTimerDemoTasksStillRunning( mainCHECK_TIMER_PERIOD_MS ) != pdTRUE ) { ulErrorOccurred |= 1UL << 16UL; } else if( xAreIntQueueTasksStillRunning() != pdTRUE ) { ulErrorOccurred |= 1UL << 17UL; } /* Check that the register test 1 task is still running. */ if( ulLastRegTest1Value == ulRegTest1LoopCounter ) { ulErrorOccurred |= 1UL << 18UL; } ulLastRegTest1Value = ulRegTest1LoopCounter; /* Check that the register test 2 task is still running. */ if( ulLastRegTest2Value == ulRegTest2LoopCounter ) { ulErrorOccurred |= 1UL << 19UL; } ulLastRegTest2Value = ulRegTest2LoopCounter; if( ulErrorOccurred != pdFALSE ) { /* An error occurred. Increase the frequency at which the check timer toggles its LED to give visual feedback of the potential error condition. */ if( lChangedTimerPeriodAlready == pdFALSE ) { lChangedTimerPeriodAlready = pdTRUE; /* This call to xTimerChangePeriod() uses a zero block time. Functions called from inside of a timer callback function must *never* attempt to block as to do so could impact other software timers. */ xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK ); } }//.........这里部分代码省略.........
开发者ID:BuiChien,项目名称:FreeRTOS-TM4C123GXL,代码行数:101,
示例22: prvCheckTaskstatic void prvCheckTask( void *pvParameters ){TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;TickType_t xLastExecutionTime;static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;unsigned long ulErrorFound = pdFALSE; /* Just to stop compiler warnings. */ ( void ) pvParameters; /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil() works correctly. */ xLastExecutionTime = xTaskGetTickCount(); /* Cycle for ever, delaying then checking all the other tasks are still operating without error. The onboard LED is toggled on each iteration. If an error is detected then the delay period is decreased from mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD. This has the effect of increasing the rate at which the onboard LED toggles, and in so doing gives visual feedback of the system status. */ for( ;; ) { /* Delay until it is time to execute again. */ vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod ); /* Check all the demo tasks (other than the flash tasks) to ensure that they are all still running, and that none have detected an error. */ if( xAreIntQueueTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 0UL; } if( xAreMathsTaskStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 1UL; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 2UL; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 3UL; } if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 4UL; } if ( xAreGenericQueueTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 5UL; } if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 6UL; } if( xIsCreateTaskStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 7UL; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 8UL; } if( xAreTimerDemoTasksStillRunning( ( TickType_t ) xDelayPeriod ) != pdPASS ) { ulErrorFound = 1UL << 9UL; } if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE ) { ulErrorFound = 1UL << 10UL; } if( xIsQueueOverwriteTaskStillRunning() != pdPASS ) { ulErrorFound = 1UL << 11UL; } if( xAreEventGroupTasksStillRunning() != pdPASS ) { ulErrorFound = 1UL << 12UL; } if( xAreInterruptSemaphoreTasksStillRunning() != pdPASS ) { ulErrorFound = 1UL << 13UL; } if( xAreQueueSetTasksStillRunning() != pdPASS ) { ulErrorFound = 1UL << 14UL;//.........这里部分代码省略.........
开发者ID:HclX,项目名称:freertos,代码行数:101,
示例23: prvCheckOtherTasksAreStillRunningstatic short prvCheckOtherTasksAreStillRunning( void ){ static short sNoErrorFound = pdTRUE; /* The demo tasks maintain a count that increments every cycle of the task provided that the task has never encountered an error. This function checks the counts maintained by the tasks to ensure they are still being incremented. A count remaining at the same value between calls therefore indicates that an error has been detected. Only tasks that do not flash an LED are checked. */ if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xArePollingQueuesStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreBlockingQueuesStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreFlashCoRoutinesStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreGenericQueueTasksStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } if( xIsCreateTaskStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } #if INCLUDE_TraceListTasks == 0 { if( xAreComTestTasksStillRunning() != pdTRUE ) { sNoErrorFound = pdFALSE; } } #endif return sNoErrorFound;}
开发者ID:jbalcerz,项目名称:Stm32Discovery_FreeRTOS,代码行数:66,
注:本文中的xAreDynamicPriorityTasksStillRunning函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xAreGenericQueueTasksStillRunning函数代码示例 C++ xAreCountingSemaphoreTasksStillRunning函数代码示例 |