Add usage assertions when deleting a queue (#1449)

Adds an assertion which helps to verify
a queue is not in use before deletion.
This commit is contained in:
Kody Stribrny 2026-07-16 09:15:53 -07:00 committed by GitHub
parent 9db704cd3b
commit 78069a79ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2261,6 +2261,8 @@ void vQueueDelete( QueueHandle_t xQueue )
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 )