mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 05:34:59 -05:00
Merge 19e901e3e8 into 9736947af2
This commit is contained in:
commit
12df28e4ea
4 changed files with 159 additions and 16 deletions
22
queue.c
22
queue.c
|
|
@ -355,10 +355,14 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
}
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceQUEUE_RESET( pxQueue, xNewQueue );
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
|
||||
traceQUEUE_RESET_FAILED( pxQueue, xNewQueue );
|
||||
}
|
||||
|
||||
configASSERT( xReturn != pdFAIL );
|
||||
|
|
@ -876,7 +880,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
{
|
||||
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
||||
|
||||
traceCREATE_COUNTING_SEMAPHORE();
|
||||
traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -915,7 +919,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
{
|
||||
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
||||
|
||||
traceCREATE_COUNTING_SEMAPHORE();
|
||||
traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -966,7 +970,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
* queue is full. */
|
||||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||
{
|
||||
traceQUEUE_SEND( pxQueue );
|
||||
traceQUEUE_SEND_EXT( pxQueue, xCopyPosition );
|
||||
|
||||
#if ( configUSE_QUEUE_SETS == 1 )
|
||||
{
|
||||
|
|
@ -1080,7 +1084,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
|
||||
/* Return to the original privilege level before exiting
|
||||
* the function. */
|
||||
traceQUEUE_SEND_FAILED( pxQueue );
|
||||
traceQUEUE_SEND_FAILED_EXT( pxQueue, xCopyPosition );
|
||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||
|
||||
return errQUEUE_FULL;
|
||||
|
|
@ -1145,7 +1149,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
prvUnlockQueue( pxQueue );
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
traceQUEUE_SEND_FAILED( pxQueue );
|
||||
traceQUEUE_SEND_FAILED_EXT( pxQueue, xCopyPosition );
|
||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||
|
||||
return errQUEUE_FULL;
|
||||
|
|
@ -1200,7 +1204,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||
const int8_t cTxLock = pxQueue->cTxLock;
|
||||
const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
|
||||
|
||||
traceQUEUE_SEND_FROM_ISR( pxQueue );
|
||||
traceQUEUE_SEND_FROM_ISR_EXT( pxQueue, xCopyPosition );
|
||||
|
||||
/* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a
|
||||
* semaphore or mutex. That means prvCopyDataToQueue() cannot result
|
||||
|
|
@ -1314,7 +1318,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
else
|
||||
{
|
||||
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
||||
traceQUEUE_SEND_FROM_ISR_FAILED_EXT( pxQueue, xCopyPosition );
|
||||
xReturn = errQUEUE_FULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -1382,7 +1386,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
{
|
||||
const int8_t cTxLock = pxQueue->cTxLock;
|
||||
|
||||
traceQUEUE_SEND_FROM_ISR( pxQueue );
|
||||
traceQUEUE_SEND_FROM_ISR_EXT( pxQueue, queueSEND_TO_BACK );
|
||||
|
||||
/* A task can only have an inherited priority if it is a mutex
|
||||
* holder - and if there is a mutex holder then the mutex cannot be
|
||||
|
|
@ -1487,7 +1491,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
else
|
||||
{
|
||||
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
||||
traceQUEUE_SEND_FROM_ISR_FAILED_EXT( pxQueue, xCopyPosition );
|
||||
xReturn = errQUEUE_FULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue