mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-18 09:08:33 -04:00
Implement functionality that allows the memory required to create a queue or semaphore to be allocated statically.
Update the standard demo task that tests statically allocated tasks to also test statically allocated queues.
This commit is contained in:
parent
eae4815bf3
commit
cf0ed4e2ac
10 changed files with 592 additions and 211 deletions
|
@ -193,7 +193,7 @@ UBaseType_t ux;
|
|||
/* We should be able to 'take' the semaphore countMAX_COUNT_VALUE times. */
|
||||
for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ )
|
||||
{
|
||||
configASSERT( xSemaphoreGetCount( xSemaphore ) == ( countMAX_COUNT_VALUE - ux ) );
|
||||
configASSERT( uxSemaphoreGetCount( xSemaphore ) == ( countMAX_COUNT_VALUE - ux ) );
|
||||
|
||||
if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) != pdPASS )
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ UBaseType_t ux;
|
|||
|
||||
/* If the semaphore count is zero then we should not be able to 'take'
|
||||
the semaphore. */
|
||||
configASSERT( xSemaphoreGetCount( xSemaphore ) == 0 );
|
||||
configASSERT( uxSemaphoreGetCount( xSemaphore ) == 0 );
|
||||
if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS )
|
||||
{
|
||||
xErrorDetected = pdTRUE;
|
||||
|
@ -232,7 +232,7 @@ UBaseType_t ux;
|
|||
/* We should be able to 'give' the semaphore countMAX_COUNT_VALUE times. */
|
||||
for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ )
|
||||
{
|
||||
configASSERT( xSemaphoreGetCount( xSemaphore ) == ux );
|
||||
configASSERT( uxSemaphoreGetCount( xSemaphore ) == ux );
|
||||
|
||||
if( xSemaphoreGive( xSemaphore ) != pdPASS )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue