mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 01:28:32 -04:00
Add recursive mutexes to PC demo.
This commit is contained in:
parent
354a57ed5e
commit
2ee98beba2
4 changed files with 130 additions and 103 deletions
|
@ -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 " );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue