mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Indent contents of a taskENTER_CRITICAL/taskEXIT_CRITICAL block. (#348)
* Indent contents of a taskENTER_CRITICAL/taskEXIT_CRITICAL block. Move a few configASSERT() statements out of a path where they would always be triggered to prevent "condition is always true" compiler warnings. * Replace configASSERT() positions due to unintended semantic change from the version where asserts were at the top of the file. Co-authored-by: RichardBarry <richardbarry.c@gmail.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
ce81bcb33f
commit
b97bb48e06
4
queue.c
4
queue.c
|
@ -277,7 +277,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
( ( SIZE_MAX / pxQueue->uxLength ) >= pxQueue->uxItemSize ) )
|
||||
{
|
||||
taskENTER_CRITICAL();
|
||||
|
||||
{
|
||||
pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
|
||||
pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
|
||||
pxQueue->pcWriteTo = pxQueue->pcHead;
|
||||
|
@ -314,7 +314,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
|
||||
vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
|
||||
}
|
||||
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue