mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
+ New feature added: Task notifications.
+ Optimise Cortex-M4F ports by inlining some critical section macros. + Original ports used a #define to set the path to portmacro.h - that method has been obsolete for years and now all the old definitions have been moved into a separate header files called deprecated_definitions.h. + Cortex-M port now check the active vector bits against 0xff when determining if a function is called from an interrupt - previously only a subset of the bits (0x1f) were checked. + Add in new standard demo/test files TaskNotify.c/h and include the files in the simulator demos. + Update trace recorder code, and some demos to use the new version (more to do). + Introduce uxTaskPriorityGetFromISR(). + Minor typo corrections. + Update MingW simulator demo to match the MSVC simulator demo.
This commit is contained in:
parent
ca22607d14
commit
85fb1cc024
65 changed files with 5524 additions and 4527 deletions
|
@ -133,6 +133,8 @@
|
|||
#include "QueueSet.h"
|
||||
#include "QueueOverwrite.h"
|
||||
#include "EventGroupsDemo.h"
|
||||
#include "IntSemTest.h"
|
||||
#include "TaskNotify.h"
|
||||
|
||||
/* Priorities at which the tasks are created. */
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
|
@ -162,7 +164,7 @@ static void prvTestTask( void *pvParameters );
|
|||
static void prvDemonstrateTaskStateAndHandleGetFunctions( void );
|
||||
|
||||
/*
|
||||
* Called from the idle task hook function to demonstrate the use of
|
||||
* Called from the idle task hook function to demonstrate the use of
|
||||
* xTimerPendFunctionCall() as xTimerPendFunctionCall() is not demonstrated by
|
||||
* any of the standard demo tasks.
|
||||
*/
|
||||
|
@ -195,6 +197,7 @@ int main_full( void )
|
|||
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create the standard demo tasks. */
|
||||
vStartTaskNotifyTask();
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
|
@ -209,6 +212,7 @@ int main_full( void )
|
|||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
vStartEventGroupTasks();
|
||||
vStartInterruptSemaphoreTasks();
|
||||
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
{
|
||||
|
@ -263,7 +267,16 @@ const TickType_t xCycleFrequency = 2500 / portTICK_PERIOD_MS;
|
|||
}
|
||||
#endif
|
||||
|
||||
if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
||||
if( xAreTaskNotificationTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: Notification";
|
||||
}
|
||||
|
||||
if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: IntSem";
|
||||
}
|
||||
else if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: EventGroup";
|
||||
}
|
||||
|
@ -374,7 +387,7 @@ void *pvAllocated;
|
|||
xMutexToDelete = NULL;
|
||||
}
|
||||
|
||||
/* Exercise heap_4 a bit. The malloc failed hook will trap failed
|
||||
/* Exercise heap_5 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 );
|
||||
|
@ -402,6 +415,12 @@ void vFullDemoTickHookFunction( void )
|
|||
|
||||
/* Exercise event groups from interrupts. */
|
||||
vPeriodicEventGroupsProcessing();
|
||||
|
||||
/* Exercise giving mutexes from an interrupt. */
|
||||
vInterruptSemaphorePeriodicTest();
|
||||
|
||||
/* Exercise using task notifications from an interrupt. */
|
||||
xNotifyTaskFromISR();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue