Add recursive mutexes to PC demo.

This commit is contained in:
Richard Barry 2008-01-27 19:27:51 +00:00
parent 354a57ed5e
commit 2ee98beba2
4 changed files with 130 additions and 103 deletions

View file

@ -95,6 +95,7 @@
#include "AltQTest.h"
#include "AltPollQ.h"
#include "AltBlckQ.h"
#include "RecMutex.h"
/* Priority definitions for the tasks in the demo application. */
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
@ -163,6 +164,7 @@ portSHORT main( void )
vCreateAltBlockTimeTasks();
vStartAltBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );
vStartAltPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartRecursiveMutexTasks();
/* Create the "Print" task as described at the top of the file. */
xTaskCreate( vErrorChecks, "Print", mainPRINT_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
@ -416,6 +418,12 @@ static portSHORT sErrorHasOccurred = pdFALSE;
sErrorHasOccurred = pdTRUE;
}
if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
{
vDisplayMessage( "Error in recursive mutex tasks!\r\n" );
sErrorHasOccurred = pdTRUE;
}
if( sErrorHasOccurred == pdFALSE )
{
vDisplayMessage( "OK " );