mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-06 12:29:03 -04:00
Add traceSTREAM_BUFFER_SET_TRIGGER_LEVEL and traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX hooks.
This enables tracers to track both the trigger level and notification index of a stream buffer if they are changed during operation.
This commit is contained in:
parent
8c87469263
commit
d39654e813
|
@ -1145,6 +1145,18 @@
|
||||||
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
|
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_TRIGGER_LEVEL
|
||||||
|
#define traceSTREAM_BUFFER_SET_TRIGGER_LEVEL( xStreamBuffer, xTriggerLevel )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED
|
||||||
|
#define traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED( xStreamBuffer )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX
|
||||||
|
#define traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX( xStreamBuffer, uxNotificationIndex )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceENTER_xEventGroupCreateStatic
|
#ifndef traceENTER_xEventGroupCreateStatic
|
||||||
#define traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer )
|
#define traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer )
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -737,11 +737,13 @@ BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
|
||||||
* buffer before a task that is waiting for data is unblocked. */
|
* buffer before a task that is waiting for data is unblocked. */
|
||||||
if( xTriggerLevel < pxStreamBuffer->xLength )
|
if( xTriggerLevel < pxStreamBuffer->xLength )
|
||||||
{
|
{
|
||||||
|
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL( xStreamBuffer, xTriggerLevel );
|
||||||
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
|
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED( xStreamBuffer );
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1662,6 +1664,8 @@ void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStream
|
||||||
/* Check that the task notification index is valid. */
|
/* Check that the task notification index is valid. */
|
||||||
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||||
|
|
||||||
|
traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX( xStreamBuffer, uxNotificationIndex );
|
||||||
|
|
||||||
pxStreamBuffer->uxNotificationIndex = uxNotificationIndex;
|
pxStreamBuffer->uxNotificationIndex = uxNotificationIndex;
|
||||||
|
|
||||||
traceRETURN_vStreamBufferSetStreamBufferNotificationIndex();
|
traceRETURN_vStreamBufferSetStreamBufferNotificationIndex();
|
||||||
|
|
Loading…
Reference in a new issue