Add traceQUEUE_RESET and traceQUEUE_RESET_FAILED hooks.

xQueueGenericReset does not feature any tracing hooks besides the API
ENTER and EXIT calls.

This introduces two new tracing hooks that, in the same style as all
other queue APIs, inform a tracer that a queue has been reset.
This commit is contained in:
schilkp 2024-06-05 11:10:52 +02:00
parent c431b358c8
commit 1fb36a0e60
2 changed files with 12 additions and 0 deletions

View file

@ -813,6 +813,14 @@
#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
#endif
#ifndef traceQUEUE_RESET
#define traceQUEUE_RESET( pxQueue, xNewQueue )
#endif
#ifndef traceQUEUE_RESET_FAILED
#define traceQUEUE_RESET_FAILED( pxQueue, xNewQueue )
#endif
#ifndef traceQUEUE_DELETE
#define traceQUEUE_DELETE( pxQueue )
#endif

View file

@ -355,10 +355,14 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
}
}
taskEXIT_CRITICAL();
traceQUEUE_RESET( pxQueue, xNewQueue );
}
else
{
xReturn = pdFAIL;
traceQUEUE_RESET_FAILED( pxQueue, xNewQueue );
}
configASSERT( xReturn != pdFAIL );