components/freertos/queue.c
/*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
/*-----------------------------------------------------------*/
lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer.
lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer .
void vQueueDelete( QueueHandle_t xQueue )
{
    Queue_t * const pxQueue = xQueue;
    configASSERT( pxQueue );
    traceQUEUE_DELETE( pxQueue );
    #if ( configQUEUE_REGISTRY_SIZE > 0 )
        {
            vQueueUnregisterQueue( pxQueue );
        }
    #endif
    #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
        {
            vPortFree( pxQueue );
        }
    #elif ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
        {
            if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
            {
                vPortFree( pxQueue );
            }
            else
            {
                mtCOVERAGE_TEST_MARKER();
            }
        }
    #else 
        {
            ( void ) pxQueue;
        }
    #endif 
}
void vQueueDelete ( QueueHandle_t xQueue ) { Queue_t * const pxQueue = xQueue ; configASSERT ( pxQueue ) ; traceQUEUE_DELETE ( pxQueue ) ; #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue ( pxQueue ) ; } #endif #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) ) { vPortFree ( pxQueue ) ; } #elif ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) { if ( pxQueue -> ucStaticallyAllocated == ( uint8_t ) pdFALSE ) { vPortFree ( pxQueue ) ; } else { mtCOVERAGE_TEST_MARKER ( ) ; } } #else { ( void ) pxQueue ; } #endif }
lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer.
lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer .
/* The queue can only have been allocated dynamically - free it
             * again. */ /* The queue could have been allocated statically or dynamically, so
             * check before attempting to free the memory. */ /* if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) ) */ /* The queue must have been statically allocated, so is not going to be
             * deleted.  Avoid compiler warnings about the unused parameter. */ /* configSUPPORT_DYNAMIC_ALLOCATION */