File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
portable/GCC/ARM_CM7/r0p1 Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 653653 #define tracePOST_MOVED_TASK_TO_READY_STATE ( pxTCB )
654654#endif
655655
656+ #ifndef traceMOVED_TASK_TO_DELAYED_LIST
657+ #define traceMOVED_TASK_TO_DELAYED_LIST ()
658+ #endif
659+
660+ #ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST
661+ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ()
662+ #endif
663+
656664#ifndef traceQUEUE_CREATE
657665 #define traceQUEUE_CREATE ( pxNewQueue )
658666#endif
901909 #define traceTASK_NOTIFY_GIVE_FROM_ISR ( uxIndexToNotify )
902910#endif
903911
912+ #ifndef traceISR_EXIT_TO_SCHEDULER
913+ #define traceISR_EXIT_TO_SCHEDULER ()
914+ #endif
915+
916+ #ifndef traceISR_EXIT
917+ #define traceISR_EXIT ()
918+ #endif
919+
920+ #ifndef traceISR_ENTER
921+ #define traceISR_ENTER ()
922+ #endif
923+
904924#ifndef traceSTREAM_BUFFER_CREATE_FAILED
905925 #define traceSTREAM_BUFFER_CREATE_FAILED ( xIsMessageBuffer )
906926#endif
Original file line number Diff line number Diff line change @@ -511,14 +511,21 @@ void xPortSysTickHandler( void )
511511 * save and then restore the interrupt mask value as its value is already
512512 * known. */
513513 portDISABLE_INTERRUPTS ();
514+ traceISR_ENTER ();
514515 {
515516 /* Increment the RTOS tick. */
516517 if ( xTaskIncrementTick () != pdFALSE )
517518 {
519+ traceISR_EXIT_TO_SCHEDULER ();
520+
518521 /* A context switch is required. Context switching is performed in
519522 * the PendSV interrupt. Pend the PendSV interrupt. */
520523 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ;
521524 }
525+ else
526+ {
527+ traceISR_EXIT ();
528+ }
522529 }
523530 portENABLE_INTERRUPTS ();
524531}
Original file line number Diff line number Diff line change @@ -95,8 +95,11 @@ typedef unsigned long UBaseType_t;
9595
9696#define portNVIC_INT_CTRL_REG ( *( ( volatile uint32_t * ) 0xe000ed04 ) )
9797#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
98- #define portEND_SWITCHING_ISR ( xSwitchRequired ) do { if( xSwitchRequired != pdFALSE ) portYIELD( ); } while( 0 )
99- #define portYIELD_FROM_ISR ( x ) portEND_SWITCHING_ISR( x )
98+ #define portEND_SWITCHING_ISR ( xSwitchRequired ) \
99+ do { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } \
100+ else { traceISR_EXIT(); } \
101+ } while( 0 )
102+ #define portYIELD_FROM_ISR ( x ) portEND_SWITCHING_ISR( x )
100103/*-----------------------------------------------------------*/
101104
102105/* Critical section management. */
Original file line number Diff line number Diff line change @@ -7577,12 +7577,14 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
75777577 {
75787578 /* Wake time has overflowed. Place this item in the overflow
75797579 * list. */
7580+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
75807581 vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
75817582 }
75827583 else
75837584 {
75847585 /* The wake time has not overflowed, so the current block list
75857586 * is used. */
7587+ traceMOVED_TASK_TO_DELAYED_LIST ();
75867588 vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
75877589
75887590 /* If the task entering the blocked state was placed at the
@@ -7611,11 +7613,13 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
76117613
76127614 if ( xTimeToWake < xConstTickCount )
76137615 {
7616+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
76147617 /* Wake time has overflowed. Place this item in the overflow list. */
76157618 vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
76167619 }
76177620 else
76187621 {
7622+ traceMOVED_TASK_TO_DELAYED_LIST ();
76197623 /* The wake time has not overflowed, so the current block list is used. */
76207624 vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
76217625
You can’t perform that action at this time.
0 commit comments