diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index 6878ce871..0775a6ece 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -757,6 +757,13 @@ #define traceCREATE_COUNTING_SEMAPHORE() #endif +#ifndef traceCREATE_COUNTING_SEMAPHORE_EXT + +/* Extended version of traceCREATE_COUNTING_SEMAPHORE that also exposes the queue + * handle after the initial count has been set */ + #define traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle ) traceCREATE_COUNTING_SEMAPHORE() +#endif + #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED #define traceCREATE_COUNTING_SEMAPHORE_FAILED() #endif diff --git a/queue.c b/queue.c index 5b97e7cf2..bb041cf49 100644 --- a/queue.c +++ b/queue.c @@ -880,7 +880,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; - traceCREATE_COUNTING_SEMAPHORE(); + traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle ); } else { @@ -919,7 +919,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; - traceCREATE_COUNTING_SEMAPHORE(); + traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle ); } else {