Prepare for a FreeRTOS V9 release candidate:

- Remove the standard demo files that used the [long since deprecated] alternative API.
- Add standard demo task that tests the new xTaskAbortDelay() function.
- Update the Win32 Visual Studio project to use Visual Studio 2015 Community Edition.
- Rename the xGenericListItem TCB member to xStateListItem as it better describes the member's purpose.
This commit is contained in:
Richard Barry 2016-02-18 10:07:42 +00:00
parent c7b7b90cc9
commit d7253324cd
58 changed files with 984 additions and 2490 deletions

View file

@ -136,6 +136,8 @@
#include "TaskNotify.h"
#include "QueueSetPolling.h"
#include "StaticAllocation.h"
#include "blocktim.h"
#include "AbortDelay.h"
/* Priorities at which the tasks are created. */
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
@ -181,6 +183,12 @@ static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 );
*/
static void prvDemoQueueSpaceFunctions( void *pvParameters );
/*
* Tasks that ensure indefinite delays are truly indefinite.
*/
static void prvPermanentlyBlockingSemaphoreTask( void *pvParameters );
static void prvPermanentlyBlockingNotificationTask( void *pvParameters );
/*-----------------------------------------------------------*/
/* The variable into which error messages are latched. */
@ -214,7 +222,11 @@ int main_full( void )
vStartEventGroupTasks();
vStartInterruptSemaphoreTasks();
vStartQueueSetPollingTask();
vCreateBlockTimeTasks();
vCreateAbortDelayTasks();
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
{
@ -242,9 +254,9 @@ int main_full( void )
/* Start the scheduler itself. */
vTaskStartScheduler();
/* Should never get here unless there was not enough heap space to create
/* Should never get here unless there was not enough heap space to create
the idle and other system tasks. */
return 0;
return 0;
}
/*-----------------------------------------------------------*/
@ -344,6 +356,14 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
{
pcStatusMessage = "Error: Queue set polling";
}
else if( xAreBlockTimeTestTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Block time";
}
else if( xAreAbortDelayTestTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Abort delay";
}
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
else if( xAreStaticAllocationTasksStillRunning() != pdPASS )
@ -671,5 +691,35 @@ unsigned portBASE_TYPE uxReturn, x;
#endif
}
}
/*-----------------------------------------------------------*/
static void prvPermanentlyBlockingSemaphoreTask( void *pvParameters )
{
SemaphoreHandle_t xSemaphore;
/* This task should block on a semaphore, and never return. */
xSemaphore = xSemaphoreCreateBinary();
configASSERT( xSemaphore );
xSemaphoreTake( xSemaphore, portMAX_DELAY );
/* The above xSemaphoreTake() call should never return, force an assert if
it does. */
configASSERT( pvParameters != NULL );
vTaskDelete( NULL );
}
/*-----------------------------------------------------------*/
static void prvPermanentlyBlockingNotificationTask( void *pvParameters )
{
/* This task should block on a task notification, and never return. */
ulTaskNotifyTake( pdTRUE, portMAX_DELAY );
/* The above ulTaskNotifyTake() call should never return, force an assert
if it does. */
configASSERT( pvParameters != NULL );
vTaskDelete( NULL );
}