FreeRTOS source:

+ Previously, if a task was deleted, the memory allocated to the task by the RTOS was freed in the Idle task.  Now if a task deletes another task the memory is freed immediately.  The idle task is however still responsible for freeing the memory when a task deletes itself.
+ Added pcQueueGetQueueName() function to return the name of a queue from its handle, assuming the queue is registers.

Demo application:
+ Update GenQTest to exercise the new pcQueueGetQueueName() function.
+ Delete workspaces from old Eclipse examples, leaving just the projects.
+ Rework comments in the MSVC simply blinky demo.
This commit is contained in:
Richard Barry 2015-12-08 20:22:58 +00:00
parent 94dd3f871b
commit 7d6609f8db
347 changed files with 256 additions and 25411 deletions

View file

@ -2370,6 +2370,34 @@ BaseType_t xReturn;
#endif /* configQUEUE_REGISTRY_SIZE */
/*-----------------------------------------------------------*/
#if ( configQUEUE_REGISTRY_SIZE > 0 )
const char *pcQueueGetQueueName( QueueHandle_t xQueue )
{
UBaseType_t ux;
const char *pcReturn = NULL;
/* Note there is nothing here to protect against another task adding or
removing entries from the registry while it is being searched. */
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
{
if( xQueueRegistry[ ux ].xHandle == xQueue )
{
pcReturn = xQueueRegistry[ ux ].pcQueueName;
break;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
return pcReturn;
}
#endif /* configQUEUE_REGISTRY_SIZE */
/*-----------------------------------------------------------*/
#if ( configQUEUE_REGISTRY_SIZE > 0 )
void vQueueUnregisterQueue( QueueHandle_t xQueue )
@ -2384,6 +2412,11 @@ BaseType_t xReturn;
{
/* Set the name to NULL to show that this slot if free again. */
xQueueRegistry[ ux ].pcQueueName = NULL;
/* Set the handle to NULL to ensure the same queue handle cannot
appear in the registry twice if it is added, removed, then
added again. */
xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0;
break;
}
else