Skip to content

Commit 78069a7

Browse files
authored
Add usage assertions when deleting a queue (#1449)
Adds an assertion which helps to verify a queue is not in use before deletion.
1 parent 9db704c commit 78069a7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

queue.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,8 @@ void vQueueDelete( QueueHandle_t xQueue )
22612261
traceENTER_vQueueDelete( xQueue );
22622262

22632263
configASSERT( pxQueue );
2264+
configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) );
2265+
configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) );
22642266
traceQUEUE_DELETE( pxQueue );
22652267

22662268
#if ( configQUEUE_REGISTRY_SIZE > 0 )

0 commit comments

Comments
 (0)