copy ..\Common\include\QPeek.h DemoTasks\include\r
copy ..\Common\include\flop.h DemoTasks\include\r
copy ..\Common\include\recmutex.h DemoTasks\include\r
+ copy ..\Common\include\death.h DemoTasks\include\r
copy ..\Common\Minimal\BlockQ.c DemoTasks\r
copy ..\Common\Minimal\integer.c DemoTasks\r
copy ..\Common\Minimal\semtest.c DemoTasks\r
copy ..\Common\Minimal\GenQTest.c DemoTasks\r
copy ..\Common\Minimal\QPeek.c DemoTasks\r
copy ..\Common\Minimal\flop.c DemoTasks\r
+ copy ..\Common\Minimal\death.c DemoTasks\r
\r
: END
\ No newline at end of file
* -NOTE- The Win32 port is a simulation (or is that emulation?) only! Do not\r
* expect to get real time behaviour from the Win32 port or this demo\r
* application. It is provided as a convenient development and demonstration\r
- * test bed only. Also, at the time of writing, a method of deleting theads \r
- * has not been implemented, although doing so would be trivial so this\r
- * functionality might be added in at a later date. At present, calling \r
- * vTaskDelete() will delete the real time task from FreeRTOS but not the Win32\r
- * thread in which the task was executing. DO NOT CALL vTaskDelete() when using \r
- * the Win32 port! This was tested using Windows XP on a dual core laptop.\r
+ * test bed only. This was tested using Windows XP on a dual core laptop.\r
*\r
* - READ THE WEB DOCUMENTATION FOR THIS PORT FOR MORE INFORMATION ON USING IT -\r
*******************************************************************************\r
#include "QPeek.h"\r
#include "recmutex.h"\r
#include "flop.h"\r
+#include "death.h"\r
\r
/* Priorities at which the tasks are created. */\r
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
vStartMathTasks( mainFLOP_TASK_PRIORITY );\r
vStartRecursiveMutexTasks();\r
\r
+ /* The suicide tasks must be created last as they need to know how many\r
+ tasks were running prior to their creation in order to ascertain whether\r
+ or not the correct/expected number of tasks are running at any given time. */\r
+ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
+\r
/* Start the scheduler itself. */\r
vTaskStartScheduler();\r
\r
{\r
pcStatusMessage = "Error: Flop";\r
}\r
+ else if( xIsCreateTaskStillRunning() != pdPASS )\r
+ {\r
+ pcStatusMessage = "Error: Create";\r
+ }\r
else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
{\r
pcStatusMessage = "Error: RecMutex";\r
\r
void vApplicationIdleHook( void )\r
{\r
- /* Sleep to reduce CPU load, but don't sleep indefinitely if not using \r
- preemption as as nothing will cause a task switch. */\r
- #if( configUSE_PREEMPTION != 0 )\r
- {\r
- SleepEx( INFINITE, TRUE );\r
- }\r
- #else\r
- {\r
- const unsigned long ulMSToSleep = 5;\r
+const unsigned long ulMSToSleep = 5;\r
\r
- SleepEx( ulMSToSleep, TRUE );\r
- }\r
- #endif\r
+ /* Sleep to reduce CPU load, but don't sleep indefinitely in case there are\r
+ tasks waiting to be terminated by the idle task. */\r
+ Sleep( ulMSToSleep );\r
}\r
/*-----------------------------------------------------------*/\r
\r