FreeRTOS: Update to r2536.
* Introduce sbBYTES_TO_STORE_MESSAGE_LENGTH * Fix bug in ucStreamBufferGetStreamBufferType() - which is only used by the Percepio trace tool. * Update the line within vTaskStartScheduler() that was setting xTickCount to 0 to instead set it to configINITIAL_TICK_COUNT. * Introduce xMessageBufferNextLengthBytes() and tests for the same. * Add call to traceTASK_SWITCHED_IN() in vTaskStartScheduler() so trace tools can see the first task to run. * Correct definition of StaticTask_t in the case that portUSE_MPU_WRAPPERS is set to 1. * prvTaskCheckFreeStackSpace() now returns configSTACK_DEPTH_TYPE to allow return values greater than max uint16_t value if required. * xStreamBufferSend() and xStreamBufferReceive() no longer clear task notification bits - clearing was unnecessary as only the task notification state is used. * Correct out of date comment in tasks.c. * Fix typo in comment in queue.h.
This commit is contained in:
parent
a89417e26e
commit
a6fa0ee497
11 changed files with 116 additions and 17 deletions
|
|
@ -301,7 +301,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
|||
|
||||
QueueHandle_t xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType )
|
||||
{
|
||||
Queue_t *pxNewQueue;
|
||||
Queue_t *pxNewQueue = NULL;
|
||||
|
||||
configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
|
||||
|
||||
|
|
@ -345,6 +345,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
|||
else
|
||||
{
|
||||
traceQUEUE_CREATE_FAILED( ucQueueType );
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
return pxNewQueue;
|
||||
|
|
@ -397,6 +398,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
|||
else
|
||||
{
|
||||
traceQUEUE_CREATE_FAILED( ucQueueType );
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
return pxNewQueue;
|
||||
|
|
@ -752,13 +754,23 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
|||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||
{
|
||||
traceQUEUE_SEND( pxQueue );
|
||||
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
|
||||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
{
|
||||
UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
|
||||
|
||||
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
|
||||
|
||||
if( pxQueue->pxQueueSetContainer != NULL )
|
||||
{
|
||||
if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )
|
||||
if( ( xCopyPosition == queueOVERWRITE ) && ( uxPreviousMessagesWaiting != ( UBaseType_t ) 0 ) )
|
||||
{
|
||||
/* Do not notify the queue set as an existing item
|
||||
was overwritten in the queue so the number of items
|
||||
in the queue has not changed. */
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
else if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )
|
||||
{
|
||||
/* The queue is a member of a queue set, and posting
|
||||
to the queue set caused a higher priority task to
|
||||
|
|
@ -805,6 +817,8 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
|||
}
|
||||
#else /* configUSE_QUEUE_SETS */
|
||||
{
|
||||
xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
|
||||
|
||||
/* If there was a task waiting for data to arrive on the
|
||||
queue then unblock it now. */
|
||||
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue