mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-18 09:08:33 -04:00
Adjusted the wrap checks in the QueueSet test task.
Added the QueueSet test to the Rowlay Stellaris and SAM4S-EK Studio demos. Updated the MSVC demo to use heap_4.c.
This commit is contained in:
parent
0262f4a6cd
commit
9b26071eb8
13 changed files with 92 additions and 60 deletions
|
@ -96,6 +96,7 @@
|
|||
|
||||
/* Standard includes. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Kernel includes. */
|
||||
#include <FreeRTOS.h>
|
||||
|
@ -292,6 +293,7 @@ const unsigned long ulMSToSleep = 15;
|
|||
xTaskHandle xIdleTaskHandle, xTimerTaskHandle, xTestTask;
|
||||
signed char *pcTaskName;
|
||||
const unsigned char ucConstQueueNumber = 0xaaU, ucConstTaskNumber = 0x55U;
|
||||
void *pvAllocated;
|
||||
|
||||
/* These three functions are only meant for use by trace code, and not for
|
||||
direct use from application code, hence their prototypes are not in queue.h. */
|
||||
|
@ -386,13 +388,17 @@ extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask );
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Exercise heap_4 a bit. The malloc failed hook will trap failed
|
||||
allocations so there is no need to test here. */
|
||||
pvAllocated = pvPortMalloc( ( rand() % 100 ) + 1 );
|
||||
vPortFree( pvAllocated );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationMallocFailedHook( void )
|
||||
{
|
||||
/* Can be implemented if required, but probably not required in this
|
||||
environment and running this demo. */
|
||||
vAssertCalled();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue