mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Add extended traceCREATE_COUNTING_SEMAPHORE hook.
Adds an extended version of traceCREATE_COUNTING_SEMAPHORE that also exposes the handle of the semaphore. This provides the tracer with the initial semaphore count which is set after the call to traceQUEUE_CREATE and was not hygienically exposed without this hook.
This commit is contained in:
parent
9c3f7706a3
commit
93f008b8bb
|
@ -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
|
||||
|
|
4
queue.c
4
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue