#include "death.h"
#include "partest.h"
#include "countsem.h"
-#include "recmutex.h"\r
-#include "flop.h"\r
+#include "recmutex.h"
+#include "flop.h"
#include "flop-reg-test.h"
/* Priorities assigned to the demo tasks. */
#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )
/* The first LED used by the COM test and check tasks respectively. */
* Called by the 'check' task to inspect all the standard demo tasks within
* the system, as described within the comments at the head of this page.
*/
-static portSHORT prvCheckOtherTasksAreStillRunning( void );
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );
/*
* Perform any hardware initialisation required by the demo application.
/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
discover an unexpected value. */
-static unsigned portBASE_TYPE xRegTestStatus = pdPASS;
+static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
/* Counters used to ensure the regtest tasks are still running. */
static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
/*-----------------------------------------------------------*/
-\r
+
int main( void )
-{\r
-\r
+{
+
/* Must be called prior to installing any interrupt handlers! */
vPortSetupInterruptController();
vStartQueuePeekTasks();
vCreateBlockTimeTasks();
vStartCountingSemaphoreTasks();
- vStartRecursiveMutexTasks();\r
-\r
- #if ( configUSE_FPU == 1 )\r
- vStartMathTasks( mainFLOP_PRIORITY );\r
- vStartFlopRegTests();\r
+ vStartRecursiveMutexTasks();
+
+ #if ( configUSE_FPU == 1 )
+ vStartMathTasks( mainFLOP_PRIORITY );
+ vStartFlopRegTests();
#endif
/* Create the tasks defined within this file. */
- xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
+ xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
+ xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
+ xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* The suicide tasks must be started last as they record the number of other
tasks that exist within the system. The value is then used to ensure at run
/* Now start the scheduler. Following this call the created tasks should
be executing. */
- vTaskStartScheduler( );
+ vTaskStartScheduler();
/* vTaskStartScheduler() will only return if an error occurs while the
idle task is being created. */
}
/*-----------------------------------------------------------*/
-static portSHORT prvCheckOtherTasksAreStillRunning( void )
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
{
portBASE_TYPE lReturn = pdPASS;
static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
{
lReturn = pdFAIL;
}
-\r
- #if ( configUSE_FPU == 1 )\r
- if( xAreMathsTaskStillRunning() != pdTRUE )\r
- {\r
- lReturn = pdFAIL;\r
- }\r
-\r
- if( xAreFlopRegisterTestsStillRunning() != pdTRUE )\r
- {\r
- lReturn = pdFAIL;\r
- }\r
- #endif\r
+
+ #if ( configUSE_FPU == 1 )
+ if( xAreMathsTaskStillRunning() != pdTRUE )
+ {
+ lReturn = pdFAIL;
+ }
+
+ if( xAreFlopRegisterTestsStillRunning() != pdTRUE )
+ {
+ lReturn = pdFAIL;
+ }
+ #endif
/* Have the register test tasks found any errors? */
if( xRegTestStatus != pdPASS )
{
portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
volatile unsigned portBASE_TYPE uxFreeStack;
+\r
+ /* Just to remove compiler warning. */
+ ( void ) pvParameters;
/* This call is just to demonstrate the use of the function - nothing is
done with the value. You would expect the stack high water mark to be
/*-----------------------------------------------------------*/
static void prvRegTestTask1( void *pvParameters )
-{
+{\r
+ /* Just to remove compiler warning. */
+ ( void ) pvParameters;
+
/* The first register test task as described at the top of this file. The
values used in the registers are different to those use in the second
register test task. Also, unlike the second register test task, this task
/*-----------------------------------------------------------*/
static void prvRegTestTask2( void *pvParameters )
-{
+{\r
+ /* Just to remove compiler warning. */
+ ( void ) pvParameters;
+
/* The second register test task as described at the top of this file.
Note that this task fills the registers with different values to the
first register test task. */
handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
-{\r
-/* To prevent the optimiser removing the variables. */\r
-volatile xTaskHandle xTaskIn = xTask;\r
-volatile signed portCHAR *pcTaskNameIn = pcTaskName;\r
+{
+/* To prevent the optimiser removing the variables. */
+volatile xTaskHandle xTaskIn = xTask;
+volatile signed portCHAR *pcTaskNameIn = pcTaskName;
+\r
+ /* Remove compiler warnings. */\r
+ ( void ) xTaskIn;\r
+ ( void ) pcTaskNameIn;\r
/* The following three calls are simply to stop compiler warnings about the
functions not being used - they are called from the inline assembly. */