mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-02-20 09:05:30 -05:00
Changes to the FreeRTOS code:
+ Introduced xTaskCreateStatic() to allow tasks to be created without any dynamic memory allocation. + When a task notification is used to unblock a task from an ISR, but the xHigherPriorityTaskWoken parameter is not used, then pend a context switch to occur during the next tick interrupt. Demo application changes: + Updated TaskNotify.c to test the case where a task is unblocked by an ISR, but does not use its xHigherPriorityTaskWoken parameter. + Updated the Win32 MSVC project to test statically allocated tasks being created and deleted. + Introduced StaticAllocation.c standard demo task.
This commit is contained in:
parent
7d6609f8db
commit
ea95020ffd
15 changed files with 839 additions and 115 deletions
|
|
@ -99,7 +99,7 @@
|
|||
* to ensure it gets processor time. Its main function is to check that all the
|
||||
* standard demo tasks are still operational. While no errors have been
|
||||
* discovered the check task will print out "No Errors" along with some system
|
||||
* status information. If an error is discovered in the execution of a task
|
||||
* status information. If an error is discovered in the execution of a task
|
||||
* then the check task will print out an appropriate error message.
|
||||
*
|
||||
*/
|
||||
|
|
@ -135,6 +135,7 @@
|
|||
#include "IntSemTest.h"
|
||||
#include "TaskNotify.h"
|
||||
#include "QueueSetPolling.h"
|
||||
#include "StaticAllocation.h"
|
||||
|
||||
/* Priorities at which the tasks are created. */
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
|
|
@ -214,6 +215,7 @@ int main_full( void )
|
|||
vStartInterruptSemaphoreTasks();
|
||||
vStartQueueSetPollingTask();
|
||||
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
vStartStaticallyAllocatedTasks();
|
||||
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
{
|
||||
|
|
@ -337,6 +339,10 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
|
|||
{
|
||||
pcStatusMessage = "Error: Queue set polling";
|
||||
}
|
||||
else if( xAreStaticAllocationTasksStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Static allocation";
|
||||
}
|
||||
|
||||
/* This is the only task that uses stdout so its ok to call printf()
|
||||
directly. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue