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 )
|
||||
#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
|
||||
#define traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer )
|
||||
#endif
|
||||
|
|
|
@ -737,11 +737,13 @@ BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
|
|||
* buffer before a task that is waiting for data is unblocked. */
|
||||
if( xTriggerLevel < pxStreamBuffer->xLength )
|
||||
{
|
||||
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL( xStreamBuffer, xTriggerLevel );
|
||||
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED( xStreamBuffer );
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
|
@ -1662,6 +1664,8 @@ void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStream
|
|||
/* Check that the task notification index is valid. */
|
||||
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||
|
||||
traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX( xStreamBuffer, uxNotificationIndex );
|
||||
|
||||
pxStreamBuffer->uxNotificationIndex = uxNotificationIndex;
|
||||
|
||||
traceRETURN_vStreamBufferSetStreamBufferNotificationIndex();
|
||||
|
|
Loading…
Reference in a new issue