mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-10-10 08:02:57 -04: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
1 changed files with 2 additions and 0 deletions
2
queue.c
2
queue.c
|
|
@ -2261,6 +2261,8 @@ void vQueueDelete( QueueHandle_t xQueue )
|
||||||
traceENTER_vQueueDelete( xQueue );
|
traceENTER_vQueueDelete( xQueue );
|
||||||
|
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
|
configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) );
|
||||||
|
configASSERT( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) );
|
||||||
traceQUEUE_DELETE( pxQueue );
|
traceQUEUE_DELETE( pxQueue );
|
||||||
|
|
||||||
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
#if ( configQUEUE_REGISTRY_SIZE > 0 )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue