Add extended traceTASK_DELAY hook, clarified traceTASK_DELAY_UNTIL.

Adds an extended version of traceTASK_DELAY that also exposes the number
of ticks to delay.
This commit is contained in:
schilkp 2024-06-07 09:58:46 +02:00
parent d39654e813
commit 19e901e3e8
2 changed files with 9 additions and 2 deletions

View file

@ -873,13 +873,20 @@
#endif #endif
#ifndef traceTASK_DELAY_UNTIL #ifndef traceTASK_DELAY_UNTIL
#define traceTASK_DELAY_UNTIL( x ) #define traceTASK_DELAY_UNTIL( xTimeToWake )
#endif #endif
#ifndef traceTASK_DELAY #ifndef traceTASK_DELAY
#define traceTASK_DELAY() #define traceTASK_DELAY()
#endif #endif
#ifndef traceTASK_DELAY_EXT
/* Extended version of traceTASK_DELAY that also exposes the number of ticks
* to delay for. */
#define traceTASK_DELAY_EXT( xTicksToDelay ) traceTASK_DELAY()
#endif
#ifndef traceTASK_PRIORITY_SET #ifndef traceTASK_PRIORITY_SET
#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority ) #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
#endif #endif

View file

@ -2446,7 +2446,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
{ {
configASSERT( uxSchedulerSuspended == 1U ); configASSERT( uxSchedulerSuspended == 1U );
traceTASK_DELAY(); traceTASK_DELAY_EXT( xTicksToDelay );
/* A task that is removed from the event list while the /* A task that is removed from the event list while the
* scheduler is suspended will not get placed in the ready * scheduler is suspended will not get placed in the ready