Add extended versions of all notify / notify give tracing hooks.

The previous versions of these macros did not hygienically expose what
task was being notified, and how/if the notification value was notified.
This commit is contained in:
schilkp 2024-06-06 12:14:03 +02:00
parent e786375a1c
commit ab558f5f97
2 changed files with 23 additions and 2 deletions

View file

@ -1021,14 +1021,35 @@
#define traceTASK_NOTIFY( uxIndexToNotify ) #define traceTASK_NOTIFY( uxIndexToNotify )
#endif #endif
#ifndef traceTASK_NOTIFY_EXT
/* Extended version of traceTASK_NOTIFY that also exposes the task being
* notified, and if/how the notification value was modified. */
#define traceTASK_NOTIFY_EXT( pxTCB, uxIndexToNotify, eAction, xReturn ) traceTASK_NOTIFY( uxIndexToNotify )
#endif
#ifndef traceTASK_NOTIFY_FROM_ISR #ifndef traceTASK_NOTIFY_FROM_ISR
#define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify ) #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
#endif #endif
#ifndef traceTASK_NOTIFY_FROM_ISR_EXT
/* Extended version of traceTASK_NOTIFY_FROM_ISR that also exposes the task
* being notified, and if/how the notification value was modified. */
#define traceTASK_NOTIFY_FROM_ISR_EXT( pxTCB, uxIndexToNotify, eAction, xReturn ) traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
#endif
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
#define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify ) #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
#endif #endif
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR_EXT
/* Extended version of traceTASK_NOTIFY_GIVE_FROM_ISR that also exposes the task
* being notified. */
#define traceTASK_NOTIFY_GIVE_FROM_ISR_EXT( pxTCB, uxIndexToNotify ) traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
#endif
#ifndef traceTASK_NOTIFY_STATE_CLEAR #ifndef traceTASK_NOTIFY_STATE_CLEAR
#define traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToNotify ) #define traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToNotify )
#endif #endif

View file

@ -7903,7 +7903,7 @@ TickType_t uxTaskResetEventItemValue( void )
break; break;
} }
traceTASK_NOTIFY( uxIndexToNotify ); traceTASK_NOTIFY_EXT( pxTCB, uxIndexToNotify, eAction, xReturn );
/* If the task is in the blocked state specifically to wait for a /* If the task is in the blocked state specifically to wait for a
* notification then unblock it now. */ * notification then unblock it now. */
@ -8045,7 +8045,7 @@ TickType_t uxTaskResetEventItemValue( void )
break; break;
} }
traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify ); traceTASK_NOTIFY_FROM_ISR_EXT( pxTCB, uxIndexToNotify, eAction, xReturn );
/* If the task is in the blocked state specifically to wait for a /* If the task is in the blocked state specifically to wait for a
* notification then unblock it now. */ * notification then unblock it now. */