mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-08-03 21:41:46 +02:00
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:
parent
9db704cd3b
commit
78069a79ea
2
queue.c
2
queue.c
@ -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 )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user