diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index 8d587cebf..f27518497 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -1029,6 +1029,14 @@ #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify ) #endif +#ifndef traceTASK_NOTIFY_STATE_CLEAR + #define traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToNotify ) +#endif + +#ifndef traceTASK_NOTIFY_VALUE_CLEAR + #define traceTASK_NOTIFY_VALUE_CLEAR( pxTCB, uxIndexToNotify, ulBitsToClear ) +#endif + #ifndef traceISR_EXIT_TO_SCHEDULER #define traceISR_EXIT_TO_SCHEDULER() #endif diff --git a/tasks.c b/tasks.c index e250ba768..b98c23db7 100644 --- a/tasks.c +++ b/tasks.c @@ -8248,6 +8248,8 @@ TickType_t uxTaskResetEventItemValue( void ) * its notification state cleared. */ pxTCB = prvGetTCBFromHandle( xTask ); + traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToClear ); + taskENTER_CRITICAL(); { if( pxTCB->ucNotifyState[ uxIndexToClear ] == taskNOTIFICATION_RECEIVED ) @@ -8287,6 +8289,8 @@ TickType_t uxTaskResetEventItemValue( void ) * its notification state cleared. */ pxTCB = prvGetTCBFromHandle( xTask ); + traceTASK_NOTIFY_VALUE_CLEAR( pxTCB, uxIndexToClear, ulBitsToClear ); + taskENTER_CRITICAL(); { /* Return the notification as it was before the bits were cleared,