Add usage assertions when deleting a queue (#1449) Adds an assertion which helps to verify a queue is not in use before deletion.
diff --git a/queue.c b/queue.c index 37d953a..83c7ac7 100644 --- a/queue.c +++ b/queue.c
@@ -2261,6 +2261,8 @@ traceENTER_vQueueDelete( xQueue ); configASSERT( pxQueue ); + configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) ); + configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) ); traceQUEUE_DELETE( pxQueue ); #if ( configQUEUE_REGISTRY_SIZE > 0 )